Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



SmtpFailedRecipientException was unhandled by user code


Home  > ASP.NET  > SmtpFailedRecipientException was unhandled by user code 
       
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
activex mdb

com smartcard

GetLastError() in VC++ Win32 Display the Value in a MessageBox

VC++ DWORD To String

VC++ Win32 compare string with empty character constant

VC++ Win32 Compress Video To Mpeg

MVC

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client

<%#(Container.DataItem("Datetime"))%> how to formar output to display only date

ajax PageMethods System InvalidOperationException

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

ASP .NET Ajax PageMethods Returned an System.InvalidOperationException While Trying to return a dataset.

Asp .net check if a string is numeric

ASP .NET Create a file

asp .net create directory

ASP .NET Disable Back Browser Button

asp .net disable cache or cahing

ASP .NET domain name to ip resolution, Get IP Address Given Host Name

ASP .NET Drop Down List Default Value

ASP .NET drop down list hide list items

ASP .NET Error Exception Conversion from string "07-18-2009" to type 'Date' is not valid

ASP .NET Exception The element 'buildProviders' cannot be defined below the application level. in ajax project

asp .net find all files in the directory

asp .net find first findnext

ASP .NET How to Populate a TreeView Control With TreeNode s Using recursive algorithm or recursion

asp .net repeater control pass commandargument OnItemCommand

ASP .NET Send Mail from YMail or Yahoo Mail using MailMessage SmtpMail

ASP .NET VB .NET Code connect to sql server using sql authentication sql connection string

ASP .NET Yahoo Mail Y Mail The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication required

ASP NET Cross thread operation not valid Control accessed from a thread other than the thread it was created on

ASP NET Get Threads Current State

ASP NET How to get a sessionid

ASP NET Howto Store Session In Database WebFram

ASP Net IX WebHosting Session Not Stored Problem

ASP.NET & VB how to clear the text of a textbox on a mouse click after the page loaded

Asp.net &vb How to upload image file into a folder in the server and to view the thumbnail of the image after uploading complete

ASP.NET ,The breakpoint will not currently be hit. No Symbols have been loaded for this document.

asp.net auto complete dropdown list

Asp.net How to put the some values from database to calendar column

Asp.net How to refresh a tree view after each activity like add new node,update node and delete node

ASP.NET How to Upload files and image and view the uploaded file contents

ASP.NET How to upload the file and images and view the contents of the uploaded files

asp.net Tree view -Error parsing control:Object referance not set to an instance of an object

ASP.NET,Datagrid Checkbox .checked value is always False even i select the checkbox

ASP.NET,How can i dynamically add new columns to a datagrid

ASP.NET,how to change the color in datagrid based on this condition from db?

ASP.NET,How to resize an image before displaying it to the image field

ASP.NET,Logout Problem,How to disable browser back button after logout .

Conversion from type 'DBNull' to type 'String' is not valid.,asp.net&vb

convert html code to display in web pages

Convert integer to unicode

CS0104 Menu is an ambiguous reference between System.Web.UI.WebControls.Menu and xxx.includes.Menu

Data View Row Filter

Declare a Multidimensional Byte Array

drop down from text bar like google

Enable javascipt in ajax

ExecuteReader: CommandText property has not been initialized, asp.net,vb,mtablestring in getsqldata function

Gmail ASP .NET System.Net.Mail Send Mail Using Gmail MailMessage SmtpClient

godaddy System.Web.HttpException: Validation of viewstate MAC failed. hosted by a Web Farm or cluster machineKey configuration validationKey validation algorithm

google drop down auto complete

how can i display rows in a dataset as columns of a DataList

How to read/view the uploaded files other than .txt like .doc,.pdf

HtmlAgilityPack Input string Error

HttpRequestValidationException

HttpUtility.HtmlEncode Preserve Enter or CrLf ASP .NET

IIS 7 The requested page cannot be accessed because the related configuration data for the page is invalid.

index

Invalid postback or callback argument.

Invalid postback or callback argument. Event validation is enabled using

Nested DataGrid DataList Repeater

NullReferenceException was unhandled by usercode,Objectreference not set to an instance of an object

PageMethods not getting called javascript

PageMethods Return dataset

PageMethods System.InvalidOperationException

PageMethods System.InvalidOperationException ASP .NET Ajax Problem Occurs while returning DataTable on call of System.Web.Services.WebMethod

Parser Error: Unknown server tag 'asp:ScriptManager'

RegisterStartupScript how does it work

registerstartupscript when does it get called

Send Mail The SMTP server requires a secure connection or the client was not authenticated Exception ASP .NET

Server was unable to process request. is not a valid virtual path.

SmtpFailedRecipientException was unhandled by user code

Specified argument was out of the range of valid values.

StackOverflowException was unhandled

System Web HttpException Request timed out

System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (ctl00$ContentPlaceHolder1$txtContents="


The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

the imported project file could not be loaded. root element is missing Visual Studio 2005

Unable to cast object of type 'Microsoft.VisualBasic.Collection' to type 'System.Data.DataSet'.

Unable to cast object of type 'System.Data.DataSet' to type 'System.Data.DataView'.

UpdatePanel Not get called ajax codebehind beakpoint never gets hit

VB NET Get Windows System Directory

VB NET Remove all non alphanumeric characters

VB NET WebBrowser Control Editable

Visual Studio Net 2005 Open in Firefox

web services persient data

XML Parsing Error not well formed

Yahoo Mail ASP .NET System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

Yahoo Mail YMail Server does not support secure connections. ASP .NET smtp.mail.yahoo.com MailMessage oSmtpClient System.Net.Mail

ASP .NET C .NET Find String between two string or substring



  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  PHP   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam