|
-
Dec 30th, 2003, 12:07 AM
#1
Thread Starter
Member
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!
-
Dec 30th, 2003, 12:48 AM
#2
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
-
Dec 30th, 2003, 06:08 AM
#3
Thread Starter
Member
Any suggestions on setting up my own SMTP server?
Thanks for your help.
-
Dec 30th, 2003, 06:59 PM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|