|
-
Sending an email not working?
I am using the MailMessage object to send e-mail.But it still not sending
an email.
Here is the code:
I have refrenced <%@ Import Namespace="System.Web.Mail" %> file in my program.
try
{
email = new MailMessage();
email.From= mFrom;
email.To = mTo;
email.Subject = mSubject;
email.Body = mBody;
email.BodyFormat =mBodyFormat;
email.Priority=MailPriority.High;
SmtpMail.Send(email);
mErrmsg="Success";
}
catch
{
mErrmsg = "Error Sending Message";
}
If I step through the above code it execute without error .But still when
I check for the e-mail, I never receive it.Let me know what is wrong with
the above code?
So why I am not able to get the email which is sended by using above code.
thanks,
Geeta.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks