PC Review


Reply
Thread Tools Rate Thread

Problems sending email

 
 
Srinivas
Guest
Posts: n/a
 
      26th Apr 2005
Hi,

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";
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.dll are installed.

My computer is connected to the internet through a Speedtouch 545 ADSL
router. I got the "10.0.0.1" by doing the ipconfig at command prompt.

Can anyone please guide me in the right direction.

Thanks,

Srinivas



 
Reply With Quote
 
 
 
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      26th Apr 2005
But we had a really odd problem on Windows 2003 Server and sending
mail through our mail server. If our messages had \n instead of \r\n for
end of line, then the mail server just wouldn't send the message.

Very odd. I tested this on several other Windows 2003 Servers and
couldn't duplicate the issue. So, we ended up just changing our code
because Microsoft technical support couldn't provide any assistance.

They were just as baffled.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx



"Srinivas" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> 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";
> 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.dll are installed.
>
> My computer is connected to the internet through a Speedtouch 545 ADSL
> router. I got the "10.0.0.1" by doing the ipconfig at command prompt.
>
> Can anyone please guide me in the right direction.
>
> Thanks,
>
> Srinivas
>
>
>



 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      27th Apr 2005
Hi srinivas:

Are there any informational or error messages from the SMTP service in
the event log?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 26 Apr 2005 22:15:30 +0100, "Srinivas" <(E-Mail Removed)>
wrote:

>Hi,
>
>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";
> 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.dll are installed.
>
>My computer is connected to the internet through a Speedtouch 545 ADSL
>router. I got the "10.0.0.1" by doing the ipconfig at command prompt.
>
>Can anyone please guide me in the right direction.
>
>Thanks,
>
>Srinivas
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
white out and lost email when sending long email (to same email ad rluchansky Windows Vista Mail 0 13th Mar 2010 05:30 PM
Sending outgoing email to Outbox before actually sending to recipi agneta Microsoft Outlook Discussion 2 17th Sep 2009 07:58 AM
Sending An Email In Excel Programmatically W/O Sending An Object nouveauricheinvestments@gmail.com Microsoft Excel Programming 8 1st Dec 2008 10:35 PM
Outlook is sending email that I'm not sending S Listgarten Microsoft Outlook 4 1st Apr 2004 04:50 AM
Getting operation failed when sending sending mass email Aka Microsoft Outlook Discussion 0 14th Jan 2004 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 PM.