Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: SendMailMerge or MultiThreading Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
raindm
Groupie
Groupie
Avatar

Joined: 31 January 2008
Location: Israel
Online Status: Offline
Posts: 44
Posted: 05 April 2008 at 2:48am | IP Logged Quote raindm

Hi,
Can SendMailMerge do the following:

1) Limit how many emails could be sent per minute?
2) Can i perform a few instances of SendMailMerge since i want to send per domain (some domains have limits of how many emails you can send per minute)
3) To each recipient i send the same email with a little changes to track what the recipient did (opened email, pressed link, etc..) i guess i can add the table (in code) a few tags for the changes. (like ##LinkPressed##) since i do not want to save all this information in database, is this correct?
4) SendMailMerge can use only Direct Send?
5) What method can you recommend for my needs?

Not related to SendMailMerge:
1) Can i add tracking ID for bunches when sending emails normally with SendMessage() using Direct Send?
Back to Top View raindm's Profile Search for other posts by raindm
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 07 April 2008 at 7:48am | IP Logged Quote Andrew

Quote:
1) Limit how many emails could be sent per minute?


Yes, but in case of sending through a relay SMTP server only, it's not supported for direct send yet. The following properties should be useful for you:

SmtpServer.MaxConnectionCount
SmtpServer.MaxSendPerSessionCount
SmtpServer.PauseInterval

With regard to direct send, there is a workaround. You can handle one of the following events:

Smtp.MessageSent
Smtp.SendingMessage

And add a delay. Delays plus several counters allow you to limit number of messages for certain domains. Also, you may implement some kind of a queue instead of delays. We recommend you to implement this as a single-threaded application (perhaps, with several instances of Smtp class which would work independently) for simplicity.

Quote:
2) Can i perform a few instances of SendMailMerge since i want to send per domain (some domains have limits of how many emails you can send per minute)


Yes, just create necessary number of instances of Smtp class. Each instance will have its own independent MailMerge job.

Quote:
3) To each recipient i send the same email with a little changes to track what the recipient did (opened email, pressed link, etc..) i guess i can add the table (in code) a few tags for the changes. (like ##LinkPressed##) since i do not want to save all this information in database, is this correct?


Exactly.

Quote:
4) SendMailMerge can use only Direct Send?
5) What method can you recommend for my needs?


Although it's possible to use direct send as well as sending through a relay server, we recommend you to perform sending through a relay server.

Quote:
Not related to SendMailMerge:
1) Can i add tracking ID for bunches when sending emails normally with SendMessage() using Direct Send?


DeliveryNotificationOptions.TrackingID property (can be accessed through Smtp.DeliveryNotification property) should be useful for you.

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

Joined: 31 January 2008
Location: Israel
Online Status: Offline
Posts: 44
Posted: 08 April 2008 at 7:04am | IP Logged Quote raindm

Thank you for this useful reply!

Another question is:
Does SendMailMerge sends with multiply connections?
if so can i limit the number of connections?
Back to Top View raindm's Profile Search for other posts by raindm
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 08 April 2008 at 10:38am | IP Logged Quote Alex

You can use Smtp object in multi-threaded mode using Smtp.MaxThreadCount property. In this mode, you can limit number of simultaneous connections to the same SMTP relay server using SmtpServer.MaxConnectionCount property.

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

Joined: 31 January 2008
Location: Israel
Online Status: Offline
Posts: 44
Posted: 11 April 2008 at 12:00am | IP Logged Quote raindm

Hi,

so Smtp.MaxThreadCount is also related to SendMailMerge?

What you mean is that i can load multiply instances of SendMailMerge and limit each instance of SendMailMerge with MaxConnectionCount ?
Can i limit the maxConnectionCount for direct send using SendMailMerge?
Back to Top View raindm's Profile Search for other posts by raindm
 
Andrew
AfterLogic Support
AfterLogic Support


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

Quote:
so Smtp.MaxThreadCount is also related to SendMailMerge?


Yes. Smtp.MaxThreadCount parallels Smtp object inside and this affects any kind of sending. Also, you're able to parallel Smtp object outside by creating several instances.

Quote:
What you mean is that i can load multiply instances of SendMailMerge and limit each instance of SendMailMerge with MaxConnectionCount ?


Actually, MaxConnectionCount is a property of SmtpServer class, not of Smtp object. You may create several instances of Smtp class and assign them the same SmtpServer object. This means MaxConnectionCount will limit number of connections for a certain SmtpServer and doesn't matter which number of Smtp instances send messages through this SmtpServer instance.

Quote:
Can i limit the maxConnectionCount for direct send using SendMailMerge?


MaxConnectionCount is not supported for direct send yet. Perhaps, we'll implement this in future releases of the product.

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

Joined: 31 January 2008
Location: Israel
Online Status: Offline
Posts: 44
Posted: 16 April 2008 at 1:40am | IP Logged Quote raindm

Thank you for all your help..

You said in the beginning of the email:
Quote:

I asked:
1) Can i add tracking ID for bunches when sending emails normally with SendMessage() using Direct Send?

You replied:

DeliveryNotificationOptions.TrackingID property (can be accessed through Smtp.DeliveryNotification property) should be useful for you.

I can't seem to find in the help file how do i access the deliveryNotification..

In case of direct send if i set:
Quote:

// Notify always.
mailer.DeliveryNotification.NotifyCondition = DsnNotifyCondition.Always;

// Notification message will include the message header of the original messsage.
mailer.DeliveryNotification.ReturnPortion = DsnReturnPortion.Header;

// Specify some unique string which will be added to notification messages.
// It can then be used to match notification message with the original message.
mailer.DeliveryNotification.TrackingID = "UNQIUE_STRING_q8sdf74d";


How do i retrieve the notification message. do you mean the header of the bunched email will include the notification message ("UNQIUE_STRING_q8sdf74d")?

Back to Top View raindm's Profile Search for other posts by raindm
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 16 April 2008 at 4:29am | IP Logged Quote Andrew

Quote:
How do i retrieve the notification message. do you mean the header of the bunched email will include the notification message ("UNQIUE_STRING_q8sdf74d")?


The delivery notification will look as follows:

Code:
Return-Path: <>
Subject: Delivery report: Report
From: MAILER-DAEMON@server.local
To: test@localhost
Date: Wed, 16 Apr 2008 15:05:03 +0400
Message-ID: <receipt-590041@server.local>
MIME-Version: 1.0
Content-Type: multipart/report; report-type="delivery-status"; boundary="_===590041====server.local===_"

--_===590041====server.local===_
Content-Type: text/plain

Message delivered to 'test@localhost'
LOCAL module(account test) reports:
Delivered to the user mailbox


--_===590041====server.local===_
Content-Type: message/delivery-status

Original-Envelope-Id: UNQIUE_STRING_q8sdf74d
Reporting-MTA: dns; server.local

Original-Recipient: rfc822;test@localhost
Final-Recipient: LOCAL;
Action: delivered
Status: 2.0.0

--_===590041====server.local===_
Content-Type: text/rfc822-headers

Received: from [192.168.0.52] (account test HELO localhost)
  by server.local
  with ESMTP id 590035 for test@localhost; Wed, 16 Apr 2008 15:05:03 +0400
MIME-Version: 1.0
X-Mailer: MailBee.NET 3.0.2.83
From: test@localhost
To: test@localhost
Subject: Report
Date: Wed, 16 Apr 2008 15:05:03 +0400
Message-ID: <1.4f4294ce4dcce55b6aee@workstation2>
Content-Type: multipart/alternative;
        boundary="----=_NextPart_000_B1FC_53ED39B5.9F87F5D3"

--_===590041====server.local===_--


As you can see, the second part contains delivery status and the unique string is contained in Original-Envelope-Id. This is a text body (however it has message/delivery-status content type) and it's easy to get that string from it.

The third part of the message (text/rfc822-headers) is the headers of the original message you sent.

Also, it's important to understand that Delivery Status Notification (DSN) is sent by mail server and if mail server doesn't support it, DSN won't be sent. Unfortunately, far from each server supports DSN.

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