Solved

SMTP Mailing Problem

Posted on 2011-09-08
1
469 Views
Last Modified: 2012-05-12
I have personal domain in google and now i have created my id as

donotreply@TDIforAccess.org

Now i tried to send my mail through SMTP server, below is my code
------------------------------------------------------------------------------
 Dim emailMessage As MailMessage
        emailMessage = New MailMessage
        emailMessage.From ="donotreply@TDIforAccess.org"
        emailMessage.To = "donotreply@TDIforAccess.org"
        emailMessage.Subject = "Thanks"
        emailMessage.Body = "Testing"  
        emailMessage.BodyFormat = MailFormat.Html
        SmtpMail.SmtpServer = "localhost"

        Try            
            SmtpMail.Send(emailMessage)          
        Catch ex As Exception
            Respone.Write(ex.Tostring)
        End Try
------------------------------------------------------------------------------------------------------

I got this error

System.Web.HttpException (0x80004005): The server rejected one or more recipient addresses. The server response was: 550 Requested action not taken: mailbox unavailable or not local ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 Requested action not taken: mailbox unavailable or not local --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at temp.btnsubmit_Click(Object sender, EventArgs e) in

----------------------------------------------------------------------------------------------------

Please give me solutions
0
Comment
Question by:citadelind
1 Comment
 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 36501152
After this:

SmtpMail.SmtpServer = "localhost"

Try adding:

SmtpMail.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question