Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Mail never arrives after sending Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
slies
Newbie
Newbie
Avatar

Joined: 17 July 2006
Location: United States
Online Status: Offline
Posts: 5
Posted: 31 October 2006 at 4:18pm | IP Logged Quote slies

Howdy,...

I'm attempting to set our Mailbee to send through our SMTP server. It is using the IIS Virtual SMTP server, We've been using the CDONTS/.Net Mailer and Persits ASPEmail in the past and are attempting to convert over to Mailbee now. However, when sending to our server which is only available inside our network it sends successfully but is never received. I'm very confused at this point since the CDONTS and ASPEmail messages arrive 100% of the time but I can't get the Mailbee messages to arrive at all. I've setup the following test senario and watched the Queue folder on the the IIS side with the following results:

-------------------------------------------
                      // Mailbee Objects
                      Smtp mailer = new Smtp();

                      mailer.SmtpServers.Add( strSMTPAddress );
                      mailer.From.AsString = strFromAddress;
                      mailer.To.AsString = strToAddress;
                      mailer.Message.Priority = MailBee.Mime.MailPriority.High;
                      mailer.Message.Subject = System.Windows.Forms.SystemInformation.ComputerName.ToString () + ": " + strSubject;
                      mailer.Log.Enabled = true;
                      if ( Format == MailFormat.Html )
                           mailer.BodyHtmlText = strMessage;
                      else
                           mailer.BodyPlainText = strMessage;

                      mailer.Send();

                      // CDONTS / .NET Objects          ;           ; 
                      SmtpMail.SmtpServer = strSMTPAddress;

                      MailMessage     objMailMessage = new MailMessage();

                      objMailMessage.Priority      & nbsp;   = MailPriority.High;
                      objMailMessage.From        ;        = strFromAddress;
                      objMailMessage.To       & nbsp;       = strToAddress;
                      objMailMessage.Subject      &n bsp;   = System.Windows.Forms.SystemInformation.ComputerName.ToString () + ": " + strSubject;
                      objMailMessage.Body        ;        = strMessage;
                      objMailMessage.BodyFormat     = Format;

                      SmtpMail.Send( objMailMessage );

---------------------------------------------

The following are the IIS files that are generated:


------------ MAILBEE Messages arrives 0% -----------
Received: from corporatesvcs.net ([10.1.10.89]) by web3.colo.local with Microsoft SMTPSVC(5.0.2195.6713);
      Tue, 31 Oct 2006 16:15:07 -0500
MIME-Version: 1.0
X-Mailer: MailBee.NET 2.0.0.6
From: QueueReader@corporatesvcs.net
To: slies@corporatesvcs.net
X-Priority: 2 (High)
Subject: SLIESXP: Queue Message
Date: Tue, 31 Oct 2006 16:14:58 -0500
Message-ID: <1.695f0c02d00286d99e5d@SLiesXP>
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Return-Path: QueueReader@corporatesvcs.net
X-OriginalArrivalTime: 31 Oct 2006 21:15:07.0580 (UTC) FILETIME=[A425BFC0:01C6FD31]

Error has occured in BIPI Order,Address Scan
10/31/2006 4:14:56 PM

SQL Error: EXECUTE permission denied on object 'usp_QGetUntransferredOrders=
', database 'DevBIPI', schema 'dbo'.

StackTrace:
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavi or cmdBeh=
avior, RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
   at QueueReaderProcessor.QueryProcessor.ProcessQueryReader(SqlCo mmand obj=
SQLCMD) in h:\visual studio projects\queuereaderserver.root\queuereaderproc=
essor\queryprocessor.cs:line 53   at QueueReaderProcessor.QueryProcessor.Pr=
ocessQueryReader(SqlCommand objSQLCMD) in h:\visual studio projects\queuere=
aderserver.root\queuereaderprocessor\queryprocessor.cs:line 63
   at QueueReaderProcessor.Processor.ProcessQueryReader(SqlCommand objSQLCM=
D) in h:\visual studio projects\queuereaderserver.root\queuereaderprocessor=
\processor.cs:line 656   at QueueReaderProcessor.Processor.ProcessQueryRead=
er(SqlCommand objSQLCMD) in h:\visual studio projects\queuereaderserver.roo=
t\queuereaderprocessor\processor.cs:line 660
   at QueueOrderProcessor.OrderProcessor.Scan() in h:\visual studio project=
s\queuereaderserver.root\queueorderprocessor\orderprocessor. cs:line 183   a=
t QueueOrderProcessor.OrderProcessor.Scan() in h:\visual studio projects\qu=
euereaderserver.root\queueorderprocessor\orderprocessor.cs:l ine 246
   at QueueReaderProcessor.Processor.ActionThread() in h:\visual studio pro=
jects\queuereaderserver.root\queuereaderprocessor\processor. cs:line 357

----------------- CDONTS Message Arrives 100% ------------
Received: from SLiesXP ([10.1.10.89]) by web3.colo.local with Microsoft SMTPSVC(5.0.2195.6713);
      Tue, 31 Oct 2006 16:15:08 -0500
thread-index: Acb9MZ775RqTM3yaQe6lRn3iClWidA==
Thread-Topic: SLIESXP: Queue Message
From: <QueueReader@corporatesvcs.net>
To: <slies@corporatesvcs.net>
Subject: SLIESXP: Queue Message
Date: Tue, 31 Oct 2006 16:14:59 -0500
Message-ID: <000001c6fd31$9f23dbb0$590a010a@SLiesXP>
MIME-Version: 1.0
Content-Type: text/plain;
     charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: high
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
Return-Path: QueueReader@corporatesvcs.net
X-OriginalArrivalTime: 31 Oct 2006 21:15:08.0189 (UTC) FILETIME=[A482ACD0:01C6FD31]

Error has occured in BIPI Order,Address Scan
10/31/2006 4:14:56 PM

SQL Error: EXECUTE permission denied on object 'usp_QGetUntransferredOrders', database 'DevBIPI', schema 'dbo'.

StackTrace:
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavi or cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
   at QueueReaderProcessor.QueryProcessor.ProcessQueryReader(SqlCo mmand objSQLCMD) in h:\visual studio projects\queuereaderserver.root\queuereaderprocessor\querypr ocessor.cs:line 53   at QueueReaderProcessor.QueryProcessor.ProcessQueryReader(SqlCo mmand objSQLCMD) in h:\visual studio projects\queuereaderserver.root\queuereaderprocessor\querypr ocessor.cs:line 63
   at QueueReaderProcessor.Processor.ProcessQueryReader(SqlCommand objSQLCMD) in h:\visual studio pro jects\queuereaderserver.root\queuereaderprocessor\processor. cs:line 656   at QueueReaderProcessor.Processor.ProcessQueryReader(SqlCommand objSQLCMD) in h:\visual studio pro jects\queuereaderserver.root\queuereaderprocessor\processor. cs:line 660
   at QueueOrderProcessor.OrderProcessor.Scan() in h:\visual studio project s\queuereaderserver.root\queueorderprocessor\orderprocessor. cs:line 183   at QueueOrderProcessor.OrderProcessor.Scan() in h:\visual studio project s\queuereaderserver.root\queueorderprocessor\orderprocessor. cs:line 246
   at QueueReaderProcessor.Processor.ActionThread() in h:\visual studio pro jects\queuereaderserver.root\queuereaderprocessor\processor. cs:line 357


Back to Top View slies's Profile Search for other posts by slies
 
slies
Newbie
Newbie
Avatar

Joined: 17 July 2006
Location: United States
Online Status: Offline
Posts: 5
Posted: 31 October 2006 at 4:23pm | IP Logged Quote slies

FYI.. the posting looks like it goofed up the code for the CDONTS section slightly...

// CDONTS / .NET Objects           
SmtpMail.SmtpServer = strSMTPAddress;

MailMessage objMailMessage = new MailMessage();

objMailMessage.Priority     = MailPriority.High;
objMailMessage.From = strFromAddress;
objMailMessage.To = strToAddress;
objMailMessage.Subject = System.Windows.Forms.SystemInformation.ComputerName.ToString () + ": " + strSubject;
objMailMessage.Body = strMessage;
objMailMessage.BodyFormat = Format;

SmtpMail.Send( objMailMessage );
Back to Top View slies's Profile Search for other posts by slies
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 01 November 2006 at 9:03am | IP Logged Quote Andrew

Actually, CDONTS doesn't connect to SMTP server to send messages, it stores them directly into the queue on the file system (like C:\Inetpub\mailroot\Pickup). You can do the same via MailBee.NET Objects as follows:

Code:
// Mailbee Objects
Smtp mailer = new Smtp();

mailer.SmtpServers.Add( strSMTPAddress );
mailer.From.AsString = strFromAddress;
mailer.To.AsString = strToAddress;
mailer.Message.Priority = MailBee.Mime.MailPriority.High;
mailer.Message.Subject = System.Windows.Forms.SystemInformation.ComputerName.ToString () + ": " + strSubject;
mailer.Log.Enabled = true;
if ( Format == MailFormat.Html )
     mailer.BodyHtmlText = strMessage;
else
     mailer.BodyPlainText = strMessage;

// Use SubmitToQueue method instead of Send.
string pickupFolderPath = @"C:\Inetpub\mailroot\Pickup";
mailer.SubmitToQueue(pickupFolderPath);

// mailer.Send();


To learn more about SubmitToQueue method, please refer to its documentation.

Please let us know if it helps.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
slies
Newbie
Newbie
Avatar

Joined: 17 July 2006
Location: United States
Online Status: Offline
Posts: 5
Posted: 01 November 2006 at 11:50am | IP Logged Quote slies

I think i figured out one piece...

I added this line

                      mailer.SmtpServers[0].SmtpOptions =
                           MailBee.SmtpMail.ExtendedSmtpO ptions.ClassicSmtpMode;

and from that point I was successfully receiving messages. Our SMTP Server is a the IIS from IIS 5.0 on Windows 2000.

However, I'm curious into looking into the queing options.

One of the things we liked about ASPEmail was that we could go back and review the messages where sent to see if we where having failures in the application to send the messages or if the recipients didn't get the messages somewhere else.

I've been using logging, however that doesn't give me much information about the email itself so I can't do a search. Is there anyway to have save a log of the Email Details?
Back to Top View slies's Profile Search for other posts by slies
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 01 November 2006 at 12:07pm | IP Logged Quote Andrew

To know whether the message has been successfully sent or not, you can catch MailBee.NET exceptions or handle Smtp.ErrorOccurred event

If an error occurerd MailBee.NET Objects throws different exceptions and fires ErrorOccurred event. If there were no exceptions thrown during sending, your application may interpret this as successful sending.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
slies
Newbie
Newbie
Avatar

Joined: 17 July 2006
Location: United States
Online Status: Offline
Posts: 5
Posted: 01 November 2006 at 2:08pm | IP Logged Quote slies

The odd think in this case... no exception was thrown. The send returned back a true. The SMTP Server accepted it. I saw it show up in the SMTP queue. However, it wasn't sending out correctly from there.

- Scott
Back to Top View slies's Profile Search for other posts by slies
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 02 November 2006 at 6:11am | IP Logged Quote Andrew

Your SMTP server successfully received the message, but cannot deliver it to the recipient. If SMTP server received the message, it's impossible to track further message path through SMTP protocol. To know the undelivery reason, you should look into your SMTP server logs or try to find the original message (or bounce back / mailer daemon message) in the "badmail" folder (by default C:\Inetpub\mailroot\Badmail). We wittingly sent some test mails to wrong addresses through our standard Windows SMTP service and found bounces with undelivery reasons (Delivery to the following recipients failed.) in the "badmail" folder.

Also, we noticed from your first post that your SMTP service receives the messages sent by MailBee.NET Objects and CDONTS from different domain names, but the same IP address:

Code:
Received: from corporatesvcs.net ([10.1.10.89]) by web3.colo.local with Microsoft SMTPSVC(5.0.2195.6713); Tue, 31 Oct 2006 16:15:07 -0500


Code:
Received: from SLiesXP ([10.1.10.89]) by web3.colo.local with Microsoft SMTPSVC(5.0.2195.6713); Tue, 31 Oct 2006 16:15:08 -0500


What does it mean?


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide