| Syed Fahad 2004-10-15, 9:25 pm |
|
Hello
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1
This error occurs when we failed to provide the ip address of the server
that we want to use to send the mail. For e.g, if i have to send mail to
my account fahad@rfmloyalty.com, I must know the Smtp Server that will
relay this email address. In my case, it's local ip is 192.168.0.2 "i m
not providing its real ip or name for some reasons "
so my code in VB.Net to accomplish this is
Private Sub sendMail(ByVal fileName As String, ByVal email As
String)
Dim message As MailMessage = New MailMessage
Dim attachment As MailAttachment = New
MailAttachment(fileName)
message.To = email
message.From = "fahad@rfmloyalty.com"
message.Subject = "An XML File Mailed From Web Page"
message.Priority = MailPriority.High
message.Body = "<B>Salam</B>"
message.Attachments.Add(attachment)
SmtpMail.SmtpServer = "192.168.2"
SmtpMail.Send(message)
End Sub
In your code, you didnt specify the Smtp Server that's y you are getting
error
Please use this
oMM.Attachments.Add(oMA);
Line 36: Smtp.SmtpServer="your server's ip or name"
Line 37: SmtpMail.Send( oMM );
Line 38: }
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|