M
moondaddy
I have some code in a web app (asp.net 2.0) and am trying to send an email
to 2 different recipients. The first one works and the second one fails.
the first email address is of the same domain as the web app (myAp.com,
(e-mail address removed)) and the second one is of a different domain
([email protected]). Why would the 2nd address fail? here's the error msg
Mailbox unavailable. The server response was: not local host
OtherDomain.com, not a gateway at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)
and here's the code:
For Each sAddress In adrses
Dim msg As System.Net.Mail.MailMessage = New
System.Net.Mail.MailMessage()
msg.To.Add(sAddress)
msg.Subject = Caption
msg.Body = "New Data Element Has Been Submitted." & vbNewLine &
vbNewLine & data
msg.From = New System.Net.Mail.MailAddress("(e-mail address removed)")
mailSvr.Send(msg)
Next sAddress
How can I send email to other address such as customers?
Thanks.
to 2 different recipients. The first one works and the second one fails.
the first email address is of the same domain as the web app (myAp.com,
(e-mail address removed)) and the second one is of a different domain
([email protected]). Why would the 2nd address fail? here's the error msg
Mailbox unavailable. The server response was: not local host
OtherDomain.com, not a gateway at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)
and here's the code:
For Each sAddress In adrses
Dim msg As System.Net.Mail.MailMessage = New
System.Net.Mail.MailMessage()
msg.To.Add(sAddress)
msg.Subject = Caption
msg.Body = "New Data Element Has Been Submitted." & vbNewLine &
vbNewLine & data
msg.From = New System.Net.Mail.MailAddress("(e-mail address removed)")
mailSvr.Send(msg)
Next sAddress
How can I send email to other address such as customers?
Thanks.