Monday, March 26, 2012

smtp mail taking too much time !

Hi , i'm using this code to send a mail with SMTP but it's taking too much time to get to destination (1 day):
SmtpMail.SmtpServer = ""
Dim msg As MailMessage = New System.Web.Mail.MailMessage
msg.Body = " This is a test"
msg.From = "user@dotnet.itags.org.company.com"
msg.To = "user@dotnet.itags.org.company.com"
msg.Subject = "Test mail"
SmtpMail.Send(msg)

Is it normal or there's something wrong. The mail stays in the queue folder for one day before it is sent.
I'm using IIS 5.0 and ASP.net 1.1 and the application is running on the Intranet of my company.
What I'm doing wrong?? Is it the system of the company anylizing the email before sending and that's
why it's taking that long ??
Please any help appreciated.
Thank you

Hi Kaelaa,
You need to specify smtpmail server.
SmtpMail.SmtpServer = "mail.myserver.com"
This is just a suggestion, as this doesn't guarantee that you will get emails on time. you may need to check with your hosting/service provider about it.
Please post back, if you need any further assistance.

Hi LongHorn,
I tried like you said to put the server name but it still takes too much time
to get to destination.
Any other ideas ?
Maybe i could show my SMTP log file !!
Thanks

use the smtp mail server that you use in your regular (Outlook Express?) client.
If your regular email gets sent OK , then your server email should to
If you don't specify a smtp server - it defaults to the IIS machinethat hte website is running on - which means you would need toconfigure that correctly
Maybe your logs will give you more to go on


kaelaa wrote:

Hi LongHorn,
I tried like you said to put the server name but it still takes too much time
to get to destination.
Any other ideas ?
Maybe i could show my SMTP log file !!
Thanks


Hi There,
Did you check with your service provider about it ?
Cheers!

0 comments:

Post a Comment