Search The ForumSearch   RegisterRegister  LoginLogin

MailBee SMTP

 AfterLogic Forum : MailBee SMTP
Subject Topic: Madness with mass mailsending Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
PSC
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 11 January 2005 at 9:09am | IP Logged Quote PSC

I called earlier today with a question conserning a problem with mass sending of mail. I have 15k customers which i send weekly invoices.

It now seems that mailbee does not handle mass sending? For i am recieving several messages from my customers with questions on cryptic mails?

The problem is as follows:
I send several thousands of mails and suddely, one of the mails attach it self at the end of the message? The problem is that my customers are starting to doubt my seriousness. And some customers end up paying others invoices.

I have yet to find the logic but i suspect it is when i change from text to html bodyformating and back again.

What i do:


  1. I start a program that returns all the mails that i am to send in the batch.

  2. Do a loop through each mail

  3. Use sendMail() function (SE UNDER)

  4. Sends the mail with SaveMessage

  5. Makes a copy of the mail

  6. Loop



The odd thing is that the copy is clean!
But the mails are infected with a previous mail?

Codesnipp:

Dim WithEvents oMailer As MailBee.SMTP

function sendMail(variables)
   oMailer.Message.FromAddr = Mail_SendFromAddress
   oMailer.Message.ToAddr = Mail_SendToAddress
   oMailer.Message.Subject = Mail_MessageSubject
   oMailer.Message.XMailer = Mail_XMailer
                     
                     
   ' Set message body
   oMailer.Message.BodyText = Mail_Messagebody
                     
   ' Set message format. If 0, plain-text; if 1, HTML text.
   If InStr(LCase(Mail_Messagebody), "<html>") Then
      oMailer.Message.BodyForm at = 1
   Else
      oMailer.Message.BodyForm at = 0
   End If

   If oMailer.Connected = True Or oMailer.Connect Then
      If oMailer.Send Then
        oMailer.Message.SaveMessage "<archive>.eml"
      end if
   end if

   oMailer.Disconnect

end function
Back to Top View PSC's Profile Search for other posts by PSC
 
PSC
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 11 January 2005 at 9:10am | IP Logged Quote PSC

You can contact me at knut@plutosystem.com
Back to Top View PSC's Profile Search for other posts by PSC
 
PSC
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 11 January 2005 at 9:26am | IP Logged Quote PSC

http://www.plutosystem.com/crypticmail.txt

This is what my customers get. This does not make any sense. Not only that, but all my characters get distorted. æøå workes fine till this problem comes along?!??!

http://www.plutosystem.com/semicorrectmail.txt

This is what my customers should be seeing.. except for all the names and other information concerning the company and the customers. and of course the æøå scrambling..
Back to Top View PSC's Profile Search for other posts by PSC
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 11 January 2005 at 11:48am | IP Logged Quote Alex

Quote:

- Sends the mail with SaveMessage
- Makes a copy of the mail


Does SaveMessage mean "Makes a copy of the mail", or make copy is something different?
If former, do you mean result of message sent is different from result of subsequent SaveMessage?

Are you sure this block always works correctly (i.e. Connect and Send always succeed):
Code:

If oMailer.Connected = True Or oMailer.Connect Then
      If oMailer.Send Then
        oMailer.Message.SaveMessage "<archive>.eml"
      end if
   end if


I would recommend to insert MsgBox to check situation whether Connect or Send fails sometimes.

Also, how SMTP object is created, and which options are set?

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
PSC
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 11 January 2005 at 7:40pm | IP Logged Quote PSC

Alex wrote:

- Sends the mail with SaveMessage

Does SaveMessage mean "Makes a copy of the mail", or make copy is something different?
If former, do you mean result of message sent is different from result of subsequent SaveMessage?

I apologize, i meant with oMailer.Send

Alex wrote:
Are you sure this block always works correctly (i.e. Connect and Send always succeed):

Truly this is not the issue at hand?

Alex wrote:
Also, how SMTP object is created, and which options are set?

Private Sub Form_Load()
    Set oMailer = New MailBee.SMTP
    blnAborted = False
    oMailer.LicenseKey = "LICENSEKEY"
    oMailer.EnableEvents = True
    oMailer.ServerName = Mail_Server
    oMailer.AuthMethod = 0
    oMailer.EnableLogging = True
    oMailer.LogFilePath = App.Path & "\mail.log"
End Sub
Back to Top View PSC's Profile Search for other posts by PSC
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 12 January 2005 at 6:16am | IP Logged Quote Alex

You may try to add oMailer.ResetMessage as a first line of sendMail. However, there is a little chance it would change anything.

Another option is to use MailBee's mass maling tool: MailBee Message Queue (MMQ) - http://www.afterlogic.com/download/message_queue.asp. There is a chance that mail server cannot handle 1000's of mail submissions at the same time. With MMQ, it's possible to queue sending so mails will be sent with limited rate. Also, you will see which messages are generated by MailBee.SMTP before their actual sending.

How it works:
- you use SMTP.SendToQueue(somedir) instead of SMTP.Send/SMTP.Connect/SMTP.Disconnect
- somedir is populated with mbm files (eml files+extra header for MMQ). 15K of these files will be generated if you send all mails at once
- you may now take a look at this mails. For example if all messages are nearly same size and problem messages (with duplicated body) are bigger, you may select sorting by size in your file manager and find out any problem ones.
- now feed this directory to MMQ. It will send mails accordingly settings specified in MMQ config (incuding sending rate, number of sends per smtp connection, etc.)

MMQ approach is much more reliable and controllable. And you will be able to see if messages still get distorted before actual sending.

Please let us know the results.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

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