Sending Mail
-
Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }
-
Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }
Did you check the Norton is Blocking or not.
Regards, Satips.:rose:
-
Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }
Are you using VS 2005 if yes then you have new namespace called System.Net.Mail USe that i think you don;t have SMPT server at your machin in running state
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hello Everyone, I'm try to send email on the net. The coding i've used is given below. This piece of code is just generating the message "Message Sent Successfully" but not sending the message physically This code of piece is clicked over a Button MailMessage mail=new MailMessage(); mail.To="manoj.manojbisht@gmail.com"; mail.From="msb1984_620@yahoo.com"; mail.Subject="Manoj Bisht"; mail.Priority=MailPriority.High; mail.Body="I Love U Do You Love Me"; try { SmtpMail.SmtpServer=""; SmtpMail.Send(mail); //Response.Write("Mail Sent Successfully"); lblMsg.Text="Mail Sent Succesffully"; lblMsg.ForeColor=Color.DarkBlue; } catch(Exception ex) { Response.Write("Message Failed"); }
-
Are you using VS 2005 if yes then you have new namespace called System.Net.Mail USe that i think you don;t have SMPT server at your machin in running state
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Sandeep Akhare wrote:
Systtem.Net.Mail
It is System.Net.Mail. Correct your Spelling Sandeep.
Regards, Satips.:rose:
-
Sandeep Akhare wrote:
Systtem.Net.Mail
It is System.Net.Mail. Correct your Spelling Sandeep.
Regards, Satips.:rose:
Thats not a issue anybody can get what the namespace is Any way i corrected it Issue solved sir :->
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Thats not a issue anybody can get what the namespace is Any way i corrected it Issue solved sir :->
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
I know it Just to make it correct i said it. Check your mail and reply to me.
Regards, Satips.:rose:
-
The below code should work else you your mail will be put in queue/badmail folder under the inetpub/mail eMail = new MailMessage(); eMail.BodyFormat = MailFormat.Text; eMail.From = _SendFrom; eMail.Fields[http://schemas.microsoft.com/cdo/configuration/smtsperver\] = "SMTPServerName"; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2; if (SMTPUser != null && SMTPPassword != null) { eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendusername"] = "mailid@yourdomain.com"; eMail.Fields[ "http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "your account password"; } eMail.To = "recipients"; SmtpMail.SmtpServer = SMTPServerName; SmtpMail.Send(eMail); //
Thanks Warm Regards Prakash-B