P
Peter
I am trying to send SMTP mail:
I have the following code which works fine on one domain, but not on other. It does not work until I remove the Message-ID: line, than it works just fine.
Here's how I removed the Message-ID line:
I stopped the SMTP service (so I could edit the mail file in the Pickup directory), ran the program to send the email, than I edited the file in the Pickup directory and removed the Message-ID line from the message, than restarted the SMTP service. If I leave the line in the file to message disappears from Pickup directory but never arrives at it's destination.
My question: Is there a way I can prevent the program from writing the Message-ID: line? or is there some other setting that I am not aware.
//-------------------- The code ---------------------------------------------------------
MailMessage aMessage = new MailMessage();
aMessage.From = "(e-mail address removed)";
aMessage.To = "(e-mail address removed)";
aMessage.Cc = "";
aMessage.Bcc = "";
aMessage.Subject = "Test";
aMessage.Body = "body";
aMessage.Attachments.Add(new MailAttachment(@"c:\1.txt", MailEncoding.Base64));
SmtpMail.SmtpServer = "";
SmtpMail.Send(aMessage);
//---------------------------------------------------------------------------------
// ---- Here is part of the message ----------------------------------------------
X-Receiver: (e-mail address removed)
X-Sender: (e-mail address removed)
From: <[email protected]>
To: <[email protected]>
Subject: Test
Date: Tue, 14 Oct 2003 15:40:21 -0500
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0001_01C39269.7A17B020"
X-Mailer: Microsoft CDO for Windows 2000
Thread-Index: AcOSk2LFkb/R5J89RPO03O858K66QA==
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
This is a multi-part message in MIME format.
I have the following code which works fine on one domain, but not on other. It does not work until I remove the Message-ID: line, than it works just fine.
Here's how I removed the Message-ID line:
I stopped the SMTP service (so I could edit the mail file in the Pickup directory), ran the program to send the email, than I edited the file in the Pickup directory and removed the Message-ID line from the message, than restarted the SMTP service. If I leave the line in the file to message disappears from Pickup directory but never arrives at it's destination.
My question: Is there a way I can prevent the program from writing the Message-ID: line? or is there some other setting that I am not aware.
//-------------------- The code ---------------------------------------------------------
MailMessage aMessage = new MailMessage();
aMessage.From = "(e-mail address removed)";
aMessage.To = "(e-mail address removed)";
aMessage.Cc = "";
aMessage.Bcc = "";
aMessage.Subject = "Test";
aMessage.Body = "body";
aMessage.Attachments.Add(new MailAttachment(@"c:\1.txt", MailEncoding.Base64));
SmtpMail.SmtpServer = "";
SmtpMail.Send(aMessage);
//---------------------------------------------------------------------------------
// ---- Here is part of the message ----------------------------------------------
X-Receiver: (e-mail address removed)
X-Sender: (e-mail address removed)
From: <[email protected]>
To: <[email protected]>
Subject: Test
Date: Tue, 14 Oct 2003 15:40:21 -0500
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0001_01C39269.7A17B020"
X-Mailer: Microsoft CDO for Windows 2000
Thread-Index: AcOSk2LFkb/R5J89RPO03O858K66QA==
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
This is a multi-part message in MIME format.