c# - Sending mail through SmtpClient -
i trying setup program sent e-mails through smtp server not localhost. using system.net.mail
. this:
var msmtpclient = new smtpclient(); var mmailmessage = new mailmessage() { subject = subject, body = body, isbodyhtml = true, priority = mailpriority.normal, };
the case is working when using google smtp server smtp.gmail.com
. treed send e-mails using server different accounts. , example hotmail.com received (though moved junk) gmail.com not.
ok. here comes hint. never use ip of pc. replace domain name or localhost. did trick me. bonus alternateviews
can help.
Comments
Post a Comment