E-Mailing in ASP .NET
-
any one please help me I have the following code for Emailing . My doubt is I am able to send mail only to gmail(as a spam) but not to other mail like yahoo(not even as a spam) etc. What could be the reason .I have even configured web.config file and ....Relay->127.0.0.1 kindly help me :rose:Thanks in advance:rose: ----------> //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress(txtFrom .Text.Trim ()); mail.To.Add(txtTo.Text.Trim ()); //set the content mail.Subject = txtSubject .Text ; //first we create the Plain Text part AlternateView plainView = AlternateView.CreateAlternateViewFromString("Some Plain Text" , null, "text/plain"); //then we create the Html part AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<b>"+txtBody .Text.Trim ()+"</b>", null, "text/html"); mail.AlternateViews.Add(plainView); mail.AlternateViews.Add(htmlView); //send the message SmtpClient smtp = new SmtpClient("127.0.0.1"); //specify the mail server address try { smtp.Send(mail); Response.Write("Mail Sent..."); txtBody.Text = ""; txtFrom.Text = ""; txtSubject.Text = ""; txtTo.Text = ""; } catch (Exception ex) { Response.Write (ex.ToString ()); } <---------->
Kovuru Sreedhar
-
any one please help me I have the following code for Emailing . My doubt is I am able to send mail only to gmail(as a spam) but not to other mail like yahoo(not even as a spam) etc. What could be the reason .I have even configured web.config file and ....Relay->127.0.0.1 kindly help me :rose:Thanks in advance:rose: ----------> //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress(txtFrom .Text.Trim ()); mail.To.Add(txtTo.Text.Trim ()); //set the content mail.Subject = txtSubject .Text ; //first we create the Plain Text part AlternateView plainView = AlternateView.CreateAlternateViewFromString("Some Plain Text" , null, "text/plain"); //then we create the Html part AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<b>"+txtBody .Text.Trim ()+"</b>", null, "text/html"); mail.AlternateViews.Add(plainView); mail.AlternateViews.Add(htmlView); //send the message SmtpClient smtp = new SmtpClient("127.0.0.1"); //specify the mail server address try { smtp.Send(mail); Response.Write("Mail Sent..."); txtBody.Text = ""; txtFrom.Text = ""; txtSubject.Text = ""; txtTo.Text = ""; } catch (Exception ex) { Response.Write (ex.ToString ()); } <---------->
Kovuru Sreedhar
Check to see if your IP Address(external) is blocked, or on a spam list. Also make sure you aren't sending messages with keywords that might tag it as spam.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
-
Check to see if your IP Address(external) is blocked, or on a spam list. Also make sure you aren't sending messages with keywords that might tag it as spam.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
what are the possible keywords for spam mail?
Kovuru Sreedhar
-
what are the possible keywords for spam mail?
Kovuru Sreedhar
it amy be any exe
SSK. Anyone who says sunshine brings happiness has never danced in the rain.