|
I want to send the user forgot passwords through the user mail id provided.
The error was occured when i have changed the subject ,from address and body of the
message to be send to the user in the code.
The error message displayed is as follows
SmtpFailedRecipientException was unhandled by user code
Mailbox name not allowed. The server response was:
Sorry, that domain isn't in my list of allowed rcpthosts.
Can U please cut and paste the code. Please try to put a break point and debug and
let me know at which like the error is happening
When i have put break points it was found that the changes i have made in the following
code was the reason.
MailMessage.From = New MailAddress("noreply@body180.com")
SmtpClient.Credentials = New System.Net.NetworkCredential("noreply@body180.com", "*****")
I have changed the string "noreplay@body180.com" as to my mail id .It is because
"noreplay@body180.com" was appearing as the from address and i wan to chage the
from address .
I think that when i have changed the address it was failed to login to the new mail account
which i want to set as the from address for sending the mail.
Please give me the mail id for
SmtpClient.Credentials = New System.Net.NetworkCredential("noreply@body180.com", "*****")
I would be able to help u
I have given my mail id just for testing and it doesn't work.
SmtpClient.Credentials = New System.Net.NetworkCredential("jerryantonypa@ymail.com", "*****")
But with the previous values i would be able to send the mails.
SmtpClient.Credentials = New System.Net.NetworkCredential("noreply@body180.com", "*****")
-------------------------------------------------------------------------------------------------------------------------------------------------
The body180.com mail is a popmail account which uses port 25 for sending.
Now Yahoo Mail the verification is done using an SSL. or Secure Shell port 465, server should
be smtp.yahoo.com. Thats why you
are not able to send a mail using the above code. Please check the code for
sending mail using Gmail in my website.
Here's the link
http://muruganad.com/ASP.NET/Gmail_ASP_.NET_System.Net.Mail_Send_Mail_Using_Gmail_MailMessage_SmtpClient.html
This above one is for Gmail I am still working on the Yahoo Mail Thing. Seems to
have some small problem sending mail using yahoo mail.
Here's the code for Gmail
Dim oMailMessage As New MailMessage("yourmailid@gmail.com", "recipient@yahoo.com", "Test Mail", "Hello World This is just a test")
Dim oSmtpClient As New SmtpClient
oSmtpClient.Host = "smtp.gmail.com"
oSmtpClient.EnableSsl = True
oSmtpClient.Port = "587"
oSmtpClient.Credentials = New System.Net.NetworkCredential("you gmail id", "yourpassword")
oSmtpClient.Send(oMailMessage)
I have tried the above code with modifications as per my requirements and it's working well.
Still it's not working with the yahoo mail account.When i have tried the following error
message was displayed.
SmtpException was unhandled by user code.
"Failure sending mail."
Also the message "Server does not support secure connections" displayed.
Yahoo pop3 and smtp works only if you have a Yahoo! Mail Plus account.
Here are some of the data below
Here are the basic server settings for Yahoo! Mail:
Incoming Mail (POP3) Server: plus.pop.mail.yahoo.com (Use SSL, port: 995)
Outgoing Mail (SMTP) Server: plus.smtp.mail.yahoo.com (Use SSL, port: 465, use authentication)
Account Name/Login Name: Your Yahoo! Mail ID (your email address without the "@yahoo.com")
Email Address: Your Yahoo! Mail address (e.g., user@yahoo.com)
Password: Your Yahoo! Mail password
Here's the link to Send Mail Using Yahoo in case you have a Yahoo Mail Plus Account
http://muruganad.com/ASP.NET/ASP_.NET_Send_Mail_from_YMail_or_Yahoo_Mail_using_MailMessage_SmtpMail.html
|