Why is mail left in the queue folder
-
:confused:Why when send mail from localhost is still on queue folder and not arrive to receiver > > > I am using ASP.NET SmtpMail to send email using the following code > > > > > > public void SendEmail(string From, string To, string Subject, > > > StringBuilder > > > Message, string Attachment, string mailFormat) > > > { > > > MailMessage mailMessage = new MailMessage (); > > > mailMessage.From = From; > > > mailMessage.To = To; > > > mailMessage.Subject = Subject; > > > mailMessage.Body = Message.ToString (); > > > > > > if(mailFormat == "T") > > > { > > > mailMessage.BodyFormat = MailFormat.Text; > > > } > > > else if(mailFormat == "H") > > > { > > > mailMessage.BodyFormat = MailFormat.Html; > > > } > > > > > > SmtpMail.SmtpServer = "10.0.0.1";//or "localhost" or "127.0.0.1" > > > SmtpMail.Send (mailMessage); > > > } > > > > > > This code executes fine without error. But the email goes and sits in > the"C:\Inetpub\mailroot\Queue" folder. > > > SMTP service is running and cdosys.dll and cdonts thanks for all
-
:confused:Why when send mail from localhost is still on queue folder and not arrive to receiver > > > I am using ASP.NET SmtpMail to send email using the following code > > > > > > public void SendEmail(string From, string To, string Subject, > > > StringBuilder > > > Message, string Attachment, string mailFormat) > > > { > > > MailMessage mailMessage = new MailMessage (); > > > mailMessage.From = From; > > > mailMessage.To = To; > > > mailMessage.Subject = Subject; > > > mailMessage.Body = Message.ToString (); > > > > > > if(mailFormat == "T") > > > { > > > mailMessage.BodyFormat = MailFormat.Text; > > > } > > > else if(mailFormat == "H") > > > { > > > mailMessage.BodyFormat = MailFormat.Html; > > > } > > > > > > SmtpMail.SmtpServer = "10.0.0.1";//or "localhost" or "127.0.0.1" > > > SmtpMail.Send (mailMessage); > > > } > > > > > > This code executes fine without error. But the email goes and sits in > the"C:\Inetpub\mailroot\Queue" folder. > > > SMTP service is running and cdosys.dll and cdonts thanks for all
is there any error in ur page? coolsweety
-
:confused:Why when send mail from localhost is still on queue folder and not arrive to receiver > > > I am using ASP.NET SmtpMail to send email using the following code > > > > > > public void SendEmail(string From, string To, string Subject, > > > StringBuilder > > > Message, string Attachment, string mailFormat) > > > { > > > MailMessage mailMessage = new MailMessage (); > > > mailMessage.From = From; > > > mailMessage.To = To; > > > mailMessage.Subject = Subject; > > > mailMessage.Body = Message.ToString (); > > > > > > if(mailFormat == "T") > > > { > > > mailMessage.BodyFormat = MailFormat.Text; > > > } > > > else if(mailFormat == "H") > > > { > > > mailMessage.BodyFormat = MailFormat.Html; > > > } > > > > > > SmtpMail.SmtpServer = "10.0.0.1";//or "localhost" or "127.0.0.1" > > > SmtpMail.Send (mailMessage); > > > } > > > > > > This code executes fine without error. But the email goes and sits in > the"C:\Inetpub\mailroot\Queue" folder. > > > SMTP service is running and cdosys.dll and cdonts thanks for all
afaik you your code is fine if you are getting mail in queue. to send it you have to have a live internet connection and valid smtp server. if it is in queue nothing is wrong with the code you need to check smtp server setting.. or relay options in IIS -----