Results 1 to 4 of 4

Thread: Use default SMTP server to send email

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2003
    Location
    Cleveland, OH
    Posts
    41

    Use default SMTP server to send email

    I have VB.NET code that sends an email from my customers to me (for product registration), so I don't want to have to define the SMTP server. Rather, I want their default/local SMTP server to be used. There must be a simple solution. Here is my code:

    Dim email As New System.Web.Mail.MailMessage
    email.To = "[email protected]"
    email.From = "[email protected]"
    email.Body = "text goes here"
    email.Subject = "subject"
    email.BodyFormat = Web.Mail.MailFormat.Text
    System.Web.Mail.SmtpMail.SmtpServer = "???"
    System.Web.Mail.SmtpMail.Send(email)

    Thanks!

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    but what happens if your client doesnt have a smtp server or it requires authetication?

    You would be better off setting up your own smtp server for them to use.

    If you still want them to use a local or preferred smtp server then just allow them to define there own but i would still have one setup for them if they dont have one or dont *know* what a 'smtp' is.

    This does depend on your customers though, if your clients are programmers then you might not have a problem.

    Anyway the best method is to assume that the user has nothing and knows nothing.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2003
    Location
    Cleveland, OH
    Posts
    41
    Any suggestions on setting up my own SMTP server?

    Thanks for your help.

  4. #4
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    What operating system are you running? 2K, WinXP, Win.Net Serv? If so you can use the SMTP service that comes with IIS.

    If not then you can download and install one of these or another one of your preference

    http://www.qksoft.com/qk-smtp-server/download.html ($)
    http://www.postcastserver.com/html/download.asp

    http://www.emailarms.com/products/1st_smtp.html ($)
    http://www.softstack.com/advsmtp.html

    but setting up an smtp server would require a static IP address or for you to register a domain name. If you are already hosting a website from a local computer then you *should* have one.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width