Solarion
Honorary Master
- Joined
- Nov 14, 2012
- Messages
- 21,885
I am using Interops and the client needs to send 2600 invoices in PDF format to customers. A previous system was buggy and ditched and this is management system for them. Please could you guys tell me how to get around that email limit as I do not want to get their account banned (They are using Gmail IMAP relay).
Much appreciate. This is the sub routing I am using FYI.
Much appreciate. This is the sub routing I am using FYI.
PHP:
Public Function SendEmail(mail_msg As MailMSG) As Boolean
Try
Dim oApp As New Microsoft.Office.Interop.Outlook.Application()
Dim oMsg As Microsoft.Office.Interop.Outlook.MailItem = DirectCast(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem)
oMsg.HTMLBody = mail_msg.Message
oMsg.Attachments.Add(mail_msg.Attachments)
' Add a recipient.
Dim oRecips As Microsoft.Office.Interop.Outlook.Recipients = DirectCast(oMsg.Recipients, Microsoft.Office.Interop.Outlook.Recipients)
' Change the recipient in the next line if necessary.
Dim oRecip As Microsoft.Office.Interop.Outlook.Recipient = DirectCast(oRecips.Add(mail_msg.[To]), Microsoft.Office.Interop.Outlook.Recipient)
oRecip.Resolve()
oMsg.Send()
releaseObject(oApp)
releaseObject(oMsg)
releaseObject(Nothing)
releaseObject(oRecips)
releaseObject(oRecip)
Return True
Catch error_t As System.Exception
ErrorLogger.LogMessage("Test", "GlobalMethods", "SendEmail(mail_msg As MailMSG)", error_t.Message)
Return False
MessageBox.Show(error_t.Message)
End Try
End Function