caibeier
asked on
SMTP deosn't deliver email message, SYSTEM.WEB.MAIL
Hi experts, I tried to use System.Web.Mail.MailMessag e to send a tests email in my VB.NET program. I built and run the program, no build errors, exceptions or whatsoever, everything seems to work fine, however the test email is not delivered at all. what are the possible causes? is there a resource that particularly discuss this topic?
Here is the basic configuration of my local SMTP server:
Anynomous access; In Relay Restriction, I granted access for "127.0.0.1";
Here is the exact code I used (except email):
Dim mailMsg As New MailMessage
mailMsg.From = "from@from.com"
mailMsg.To = "to@to.com"
mailMsg.Subject = "test subject"
mailMsg.Body = "test Body"
mailMsg.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailMsg)
Here is the basic configuration of my local SMTP server:
Anynomous access; In Relay Restriction, I granted access for "127.0.0.1";
Here is the exact code I used (except email):
Dim mailMsg As New MailMessage
mailMsg.From = "from@from.com"
mailMsg.To = "to@to.com"
mailMsg.Subject = "test subject"
mailMsg.Body = "test Body"
mailMsg.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "127.0.0.1"
SmtpMail.Send(mailMsg)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi LordWabbit, thank you very much for the info. Does it mean that the only way I can use local iis smpt server to send email is to relay it to a proper server? is it possible to configure my local smpt server to be the "proper" server? (I mean, a simple way, not hard complex way)
Thanks again!
Thanks again!
nope i'm afraid not, it's a virtual passthrough server, it cannot send emails by itself, simply relay them onto a real smtp server. there are several smtp servers floating around, i can't give you any names cos i've never needed to install and use one, some will probably be open source as well so no costs, but open source can be a two edged sword, i would suggest extensive research and testing before letting one loose in a production environment. if you have access to an outlook server you can always point your smtp host at it (depending on the configuration of the outook server). If the server supports telnet sending of email i wrote a dll to send mails via telnet as well as add attachments using mime encoding, shout if you need the source (but you need an outlook server which allows telnet).
ASKER
I think I'll just stick with using an external server, that's much easier. (O:
Again, thanks for your help!
Again, thanks for your help!
ASKER
C:\Inetpub\mailroot\Queue
what happened, why the SMTP server queued them instead of sending them out?