PDA

View Full Version : e-mail's from asp.net


bruce
09-14-2004, 02:21 AM
Your code looks fine to me.

Do you get any error message?


[b]quote:Originally posted by rahulbhot

i used system.web.mail to send automated e-mail's from my website
i debuged the code , configured the mail server .
still mail's are not sent
what else should i try
please review the code below:

Dim objMM As New MailMessage

objMM.To = "aaa@bbb.com"
objMM.From = "xxx@yyy.com"


objMM.BodyFormat = MailFormat.Text

objMM.Priority = MailPriority.Normal

objMM.Subject = "Hello there!"

objMM.Body = "Hi!" & vbCrLf & vbCrLf &
"How are you doing?"

SmtpMail.SmtpServer = "localhost"

'tried changing SmtpMail.SmtpServer to local IP


SmtpMail.Send(objMM)



R.B.
</blockquote id="quote"></font id="quote">

B.

DiscountASP.NET
http://www.DiscountASP.NET

rahulbhot
09-14-2004, 06:35 AM
i used system.web.mail to send automated e-mail's from my website
i debuged the code , configured the mail server .
still mail's are not sent
what else should i try
please review the code below:

Dim objMM As New MailMessage

objMM.To = "aaa@bbb.com"
objMM.From = "xxx@yyy.com"


objMM.BodyFormat = MailFormat.Text

objMM.Priority = MailPriority.Normal

objMM.Subject = "Hello there!"

objMM.Body = "Hi!" & vbCrLf & vbCrLf &
"How are you doing?"

SmtpMail.SmtpServer = "localhost"

'tried changing SmtpMail.SmtpServer to local IP


SmtpMail.Send(objMM)



R.B.

goinggoneco
09-14-2004, 10:10 AM
Looks to me like "localhost" is the wrong answer. My set-up has the web server running on a different machine than the mail server. e.g. www.xxx.com != mail.xxx.com

David

goinggoneco
09-14-2004, 10:14 AM
And if that is not it, than it is probably that "yyy.com" is not authorized to relay through the local smtp server. Look into configuring the local smtp server to open that up.

David

bruce
09-15-2004, 12:53 PM
Localhost is the SMTP host you should use for web application hosted on our server.

[b]quote:Originally posted by goinggoneco

And if that is not it, than it is probably that "yyy.com" is not authorized to relay through the local smtp server. Look into configuring the local smtp server to open that up.

David
</blockquote id="quote"></font id="quote">

B.

DiscountASP.NET
http://www.DiscountASP.NET