G
Guest
I am running on Windows 2000 Professional with SP4. I have my SMTP server
started.
Thank you in advance for your support.
Try #1:
The code in .Net as in the following
Imports System.Web.Mail
Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
Message.To = ToAddress
Message.From = FromAddress
Message.Subject = “Helloâ€
Message.Body = “Testâ€
Try
SmtpMail.SmtpServer = MyServerName
SmtpMail.Send(Message)
Catch ehttp As System.Web.HttpException
Console.WriteLine("0", ehttp.Message)
End Try
The error was caught stating, "Could not access 'CDO.Message' object."
Try #2
Then I tried to use VB6 code to send out email as in the following:
Sub Main()
Dim objNewMail As CDONTS.NewMail
Dim sMsg As String
On Error GoTo Handler
Set objNewMail = New CDONTS.NewMail
objNewMail.Subject = "Hello"
objNewMail.Body = "test"
objNewMail.From = FromAddress
objNewMail.To = ToAddress
objNewMail.Send
Set objNewMail = Nothing
Handler:
If Err.Number <> 0 Then
MsgBox (Err.Description)
Err.Clear
End If
End Sub
No error was caught. However, the mails were listed in the
\Inetpub\mailroot\BadMail folder as given below:
From: postmaster@CMDGNOR050277
To: (e-mail address removed)
Date: Fri, 25 Mar 2005 16:00:42 -0500
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277"
Message-ID: <5QXb66sJd00000001@CMDGNOR050277>
Subject: Delivery Status Notification (Failure)
This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail
program.
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
(e-mail address removed)
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: message/delivery-status
Reporting-MTA: dns;CMDGNOR050277
Received-From-MTA: dns;CMDGNOR050277
Arrival-Date: Fri, 25 Mar 2005 16:00:41 -0500
Final-Recipient: rfc822;[email protected]
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;550 Relaying is prohibited
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: message/rfc822
Received: from mail pickup service by CMDGNOR050277 with Microsoft SMTPSVC;
Fri, 25 Mar 2005 16:00:41 -0500
From: <[email protected]>
To: <[email protected]>
Subject: Koroseal
Date: Fri, 25 Mar 2005 16:00:41 -0500
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <CMDGNOR050277KYuRid00000001@CMDGNOR050277>
X-OriginalArrivalTime: 25 Mar 2005 21:00:41.0835 (UTC)
FILETIME=[B477CBB0:01C5317D]
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277--
started.
Thank you in advance for your support.
Try #1:
The code in .Net as in the following
Imports System.Web.Mail
Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
Message.To = ToAddress
Message.From = FromAddress
Message.Subject = “Helloâ€
Message.Body = “Testâ€
Try
SmtpMail.SmtpServer = MyServerName
SmtpMail.Send(Message)
Catch ehttp As System.Web.HttpException
Console.WriteLine("0", ehttp.Message)
End Try
The error was caught stating, "Could not access 'CDO.Message' object."
Try #2
Then I tried to use VB6 code to send out email as in the following:
Sub Main()
Dim objNewMail As CDONTS.NewMail
Dim sMsg As String
On Error GoTo Handler
Set objNewMail = New CDONTS.NewMail
objNewMail.Subject = "Hello"
objNewMail.Body = "test"
objNewMail.From = FromAddress
objNewMail.To = ToAddress
objNewMail.Send
Set objNewMail = Nothing
Handler:
If Err.Number <> 0 Then
MsgBox (Err.Description)
Err.Clear
End If
End Sub
No error was caught. However, the mails were listed in the
\Inetpub\mailroot\BadMail folder as given below:
From: postmaster@CMDGNOR050277
To: (e-mail address removed)
Date: Fri, 25 Mar 2005 16:00:42 -0500
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277"
Message-ID: <5QXb66sJd00000001@CMDGNOR050277>
Subject: Delivery Status Notification (Failure)
This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail
program.
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
(e-mail address removed)
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: message/delivery-status
Reporting-MTA: dns;CMDGNOR050277
Received-From-MTA: dns;CMDGNOR050277
Arrival-Date: Fri, 25 Mar 2005 16:00:41 -0500
Final-Recipient: rfc822;[email protected]
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;550 Relaying is prohibited
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277
Content-Type: message/rfc822
Received: from mail pickup service by CMDGNOR050277 with Microsoft SMTPSVC;
Fri, 25 Mar 2005 16:00:41 -0500
From: <[email protected]>
To: <[email protected]>
Subject: Koroseal
Date: Fri, 25 Mar 2005 16:00:41 -0500
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <CMDGNOR050277KYuRid00000001@CMDGNOR050277>
X-OriginalArrivalTime: 25 Mar 2005 21:00:41.0835 (UTC)
FILETIME=[B477CBB0:01C5317D]
--9B095B5ADSN=_01C5317D8C02842000000001CMDGNOR050277--