C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

send email using smtpclient


Posted Date: 29 Nov 2008      Posted By: santhosh      Member Level: Bronze     Points: 1   Responses: 2



I am using smtpclient at windows application for email sending purpose mail sending successfully but mail received one day delay. how can i send the quick mail.

using (MailMessage mailMessage = new MailMessage(new MailAddress(fromid),
new MailAddress(toid)))
{
mailMessage.Body = "hi";
mailMessage.Subject = "NewsLetter";

try
{

SmtpClient smtpClient = new SmtpClient(IPAdd);
smtpClient.Send(mailMessage);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "EMail", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}

I used this code. i am creating windows based mail send application.





Responses

Author: Pavani    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

Hi

The only job of SMTP is sending an receiving mails. Using SMTP, if you are sending mail, it just passes the mail, but doesn't take
responsibility of reaching the destination immediately. Sending the mail immediately or for for every hour or day... sort of settings depend on settings. So try to check the settings, whether its been set to send the mail immediately or once in an hour/day...

Regards,
Pavani.



Author: Lalit Vasant Patil    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

Hi,

There is no probelm in your code.

I think that there might be setting for "Check
foe new messages every XXXX minutes". so check the setting.


-Happy Codding (-_-)



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : windows service
Previous : how to transfer data from datagridview to excel sheet in windows application using C#?
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use