Bulk emailing

Das's goravanis at gmail.com
Sat Jun 5 12:31:19 UTC 2021


> 
> How do I send bulk emails with attachments in $OS 10.2 through either Outlook 365 or GMail with TLS security layer? 
> 


I send single emails, that respond to a users request for a report which I provide as attached PDF.

So I can comment on how to send an email, with an attachment, but my way may or may not be the best way to do bulk.. I’m not a master like some of the guys on here.. I try to get by.

I don’t know about TLS security layer.. don’t know if I’m using it or not. 

I use Gmail. To do it, I had to acquire (easy) an Application Specific Password from Google, from your Mail accounts control panel. You have to have your account secure according to them.. you have to handle all the little security issues they put at you on the your account window in Gmail.. then you are allowed to check out an application specific password.. and you use this password when you send emails and it works. 

The way you send a mail in Omnis, one way, not the way they now recommend, is to use the SMTPSend command. Now Omnis recommends a different command structure for sending emails but that method is at first glance too complex for me. (o2AUTH)

Here is the essential code for packing up your Mimelist and sending the email

I pack the list in a real lazy way here.. you can do it with way less lines of code.. I wanted mine to be very clear to me here


Do lmimelist.$define(lLevel,lContentType,lContentSubType,lFileName,lCharData,lBinData,lCharSet,lEncoding)

Calculate lLevel as 0
Calculate lContentType as 'multipart'
Calculate lContentSubType as 'mixed'
Calculate lFileName as ''
Calculate lCharData as ''
Calculate lBinData as ''
Calculate lCharSet as ''
Calculate lEncoding as ''
Do lmimelist.$add()

Calculate lLevel as 1
Calculate lContentType as 'text'
Calculate lContentSubType as 'plain'
Calculate lFileName as ''
Calculate lCharData as 'Enclosed and attached to this mail you will find your Vedic Astrological Chart and Readings in a PDF document you should save somewhere safe. This may be a gift that someone sent you or you ordered it for yourself, either way it is valuable.'
Calculate lBinData as ''
Calculate lCharSet as ''
Calculate lEncoding as ''
Do lmimelist.$add()

Calculate lLevel as 1
Calculate lContentType as 'application'
Calculate lContentSubType as 'pdf'
Do FileOps.$splitpathname(tvPDFPath,ivDriveName,ivDirName,ivFileName,ivFileExt)
Calculate lFileName as con(ivFileName,ivFileExt)
Calculate lCharData as ''
ReadBinFile (tvPDFPath,lBinData)
Calculate lCharSet as ''
Calculate lEncoding as ''
Do lmimelist.$add()

SMTPSend ('goravani.com','goravanis at gmail.com',iemail,'Vedic Astrology Chart and Readings',lmimelist,,,'ReadMyAstrology.com',,,,'goravanis at gmail.com','felfkjhkjhuhiw',0,kFalse) Returns #F

Note that you pack a Mimelist.. mine has three lines.. it can have more.. note the Content Type and subtype have to be correct for that line, you start with a multipart and mixed line.. you have to have that.. then you put your content after that.. in my case it’s just a brief note then the PDF on the next line.. then at the end note that your Mimelist in passed in the SMTPSend command.. as your content.. note that iEmail, the field, is packed on my form window and is just passed to the SMPTPSend command straight.. that’s the email it’s going to.. 

Omnis now recommends using O2AUTH as the way to send mails. On checking it out it was too complex for me. I understand this method and it works. 

Note that the funny string of letters in my SMTPSEND COMMAND is my application specific password from Google, typed all wrong here of course





More information about the omnisdev-en mailing list