0

I want to send a mail with through ASP.Net.But,that's gives me "SendUsing" error.

Code:

<%
string strKime = "[email protected]";
string strKimden = "[email protected]";
string strKonu = "ASP.net mail gönderme işlemi";
string strMetin = "Bu sayfa asp.net mail komponenti     tarafından gönderildi";
System.Web.Mail.SmtpMail.Send(strKimden, strKime, strKonu, strMetin);

%> 

3 Answers 3

1

Perhaps, SMTP Server is not configured correctly? it is recommended that we always specify the definite smtpserver names for when calling the System.Web.Mail components or CDO.

Not sure if you are using this directly in the markup. Ideally, you should have a common code that sends emails taking the required parameters. Check out the link in one of the other answers.

Sign up to request clarification or add additional context in comments.

Comments

1

Did you add the SMTP settings in the web.config file?

<system.net>
<mailSettings>
  <smtp>
    <network 
         host="ServerHostname" 
         port="portNumber"
         userName="username"
         password="password" />
  </smtp>
</mailSettings>

Email sending requires SMTP settings.

Comments

0

You have to set the SmtpClient Host property to the "mail.hot.com" or the ip of your outgoing mail server.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.