AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Sending mails in Asp.net
Posted by Sreekumar on  5/21/2009 4:38:06 AM Category: ADO.NET
Add to my favorites
Email to friend
I tried to send mail from asp.net application.But it is showing following error

Server Error in '/H1' Application.
The server rejected the sender address. The server response was: 553 Sorry, your envelope sender is in my badmailfrom list.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: The server rejected the sender address. The server response was: 553 Sorry, your envelope sender is in my badmailfrom list.

Please help me what all we need to set and how can we send mail from asp.net c#

Post Your Reply Post New Question

 Viewer's Reply
send mail in asp .net c#
Answered By santosh Yadav on 5/28/2009 4:22:42 AM
using name space system.web.mail

mailmessage mail=new mailmessage
mail.to=textbox1.text;
mail.from=textbox2.text;
mail.subject=textbox3.text;
mail.body=textbox4.text;
smtpmail.smtpserver=" ";
smtpmail.send(mail);

response.write("mail send successfully");
 
Re:Viewer's Answers
Answered By Sreekumar on 5/28/2009 6:52:11 AM
Thanks.. but am using IIS7.0 and Vista I configured it for smtp..now also same error showing
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Programmers Heaven C# School Book - Free 338 Page eBook
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
No Nonsense XML Web Development With PHP - Free 146 Page Preview!