Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Queue

 AfterLogic Forum : MailBee.NET Queue
Subject Topic: Bulk mail and merge Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
loredano
Newbie
Newbie
Avatar

Joined: 11 April 2018
Location: Italy
Online Status: Offline
Posts: 15
Posted: 28 November 2018 at 1:00am | IP Logged Quote loredano

Hello.

We have a window service that from a csv and using a software of layout composition produce the data of the mail to send (bulk send) as PEC.
The data are: from,to (only one), body, object and one attachment; then it saves the data in a sqlserver database and save the eml in the folder.
We have many customer so the folder where the service saves the eml is different for every customer (i.e. account smtp). The state of these email in the database are TOSEND.

Another window service select all the records from the database of the email in the "TOSEND" state ad using the mailmerge (mail merge, mailer.AddJo, mailer.SendJobs) sends all the email. So the select on database to datatable for email merge take some time. After the service update the state of the mail in the database (from TOSEND to SENT).

My question is; we have already the eml produced by the first service so we can use this; we want select only the id of the email and the path of the eml (different for every customer/smtp) so the query is more fast and load the eml using the same process of your mailbequeue.
You think this procedure can be faster than the one we use now?

Best regards
Back to Top View loredano's Profile Search for other posts by loredano
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 28 November 2018 at 1:39am | IP Logged Quote Alex

Yes, looks like it can be faster.

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

Joined: 11 April 2018
Location: Italy
Online Status: Offline
Posts: 15
Posted: 30 November 2018 at 6:04am | IP Logged Quote loredano

In this case, so i read the list (Ienumerable) of email to send and for each element in the collection i use:
mailer.AddJob("IdEmail", PathEml, true, null}
At the end can i retrieve the mail not sent as in mailmerge procedure (from the JobsFailed) or I have to use the handler SmtpMessageNotSentEventHandler as in mailbequeue? I want update the state of the mail in the collection in a transaction not one by one and have more task (each for every customer smtp).

Thanks
Back to Top View loredano's Profile Search for other posts by loredano
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 03 December 2018 at 3:02am | IP Logged Quote Alex

I believe both methods will work.

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