I want to send mail to my clients like their password and some other information also
what should i do for that.
how outlook express is helpful for that.
when i am using password recovery wizard than the error coming


"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. i6sm1072465iba.8"


i m working visual stdio 2008, asp.net 3.5 framework


thanks

Recommended Answers

All 12 Replies

Would you like to extract user information from databases and then send that user information over the email ?

If you are sending an email through SSL SMTP like gmail, then you must need to set smtpClient.EnableSsl = true.

Another thing PasswordRecovery wizard automatically send an email So you need to stop it by setting e.Cancel = true by handling SendingMail() event of PasswordRecovery wizard and in the event do your custom coding of sending an email..

protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
   e.Cancel = true;
   SmtpClient client = new SmtpClient();
   client.EnableSsl = true;
   //now define mailmessage object and set properties as per your requirement..             
}

try by this and let us know...

I want to send mail to my clients like their password and some other information also
what should i do for that.
how outlook express is helpful for that.
when i am using password recovery wizard than the error coming


"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. i6sm1072465iba.8"


i m working visual stdio 2008, asp.net 3.5 framework


thanks

Thanks Rohand
this is not working for me . is there is any need to install SMTP service of IIS at control panel ? i am unalble to install this.

are you getting any error ? if so then what the error is ? can you please put your code to send an email...?

Thanks Rohand
this is not working for me . is there is any need to install SMTP service of IIS at control panel ? i am unalble to install this.

Hii Rohand
Now i installed QSMTP server on my computer.and password recovery wizard is giving the message "your password has beeb sent to your mail "
but there is no mail sent.

I am unable to send a mail via ASP.NET. It is not givng any errors, but i am unable to see the mail in my inbox.

below is the code.

protected void Button1_Click(object sender, EventArgs e)
    {
        MailMessage message = new MailMessage();
        SmtpClient smtpClient = new SmtpClient();
        //SmtpClient.Host = ConfigurationManager.AppSettings["SMTPHost"];
        
        smtpClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;

        try
        {
            MailAddress fromAddress = new MailAddress("mukundkallapur@gmail.com");
            smtpClient.Port = 25;
            message.From = fromAddress;

           


            message.To.Add("mukundgkallapur@gmail.com");
            
            message.IsBodyHtml = false;
            
            message.Subject = "test";
            message.Body = "test";

            smtpClient.Send(message);
            
            Label3.Text = "Email Sent";


        }
        catch(Exception ex)

        {
            Label3.Text = "Sending Failed" + ex.Message;


        }


    }

Just make sure your email not stored in Spam folder... check it and let us know..

Hii Rohand
Now i installed QSMTP server on my computer.and password recovery wizard is giving the message "your password has beeb sent to your mail "
but there is no mail sent.

No rahand
i checked spams.. mail is not there.actualyy i need some relay setting.
please tell me about this setting.

i cheked .... mail are not in spams.
i think it required some relay setting ...please tell me about relay setting

ed spams.. mail is not there.actualyy i need some relay setting.
please tell me about this setting.

this is happening to me too....
I get this error:
The SMTP server requires a secure connection or the client's identity is not verified. Must issue a STARTTLS command first.
here is the aspx.cs code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;

public partial class Contact : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MailMessage MailMessage = new MailMessage();
        SmtpClient SmtpClient = new SmtpClient("smtp.gmail.com");
        try
        {
            MailAddress fromAddres = new MailAddress("someUser@example.com");
            SmtpClient.Port = 25;
            MailMessage.From = fromAddres;
            MailMessage.To.Add("someOtherUser@example.com");
            MailMessage.IsBodyHtml = false;
            MailMessage.Subject = "Naslov poruke test";
            MailMessage.Body = "Hello, evo ga neki test a ovo je drugi red poruke";
            SmtpClient.Send(MailMessage);
            Response.Write("E-mail je poslan!");
        }
        catch (Exception ex)
        {
            Response.Write("<p style=\"background: white;\">Poruka nije poslata!" + ex.Message + "</p>");
        }
    }
}

The SMTP server requires a secure connection

GMail's SMTP port is not 25 IIRC, and the password is missing.

Next time, please start a new discussion, instead of resurrecting an old thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.