Solved

SMTP Mailing Problem

Posted on 2011-09-08
1
458 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now