ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Looking for a Mass Mailer

<< < (2/2)

Stoic Joker:
Blat would be fine if I had a month to play with and learn it. But this - of course - is a @*$^$%%# firedrill.

Sigh...

Only GUI's I found for Blat have no way of feeding in the address list, so I'm back to probably chunking the address list into Outlook in sections and hoping that nobody replies.

*Joy*...

4wd:
Blat would be fine if I had a month to play with and learn it. But this - of course - is a @*$^$%%# firedrill.-Stoic Joker (March 19, 2020, 08:44 AM)
--- End quote ---

Basic use here

eg. You could have a HTML file as follows:

panic.html

--- Code: Text ---Dear Client, As you know in this trying time of crazy weather, stupid governments,and incessant bickering relatives, we have now learnt that Natureis out to eliminate us with a virus for all the wrong we have done to the planet. Having looked at this problem logically we have determined that there is reallyonly one coarse of action: <img src="cid:KC.jpg"> Yours Sincerely, Fin Dusinpub
Using the image attached to this post, the command would be, (assuming image is located at D:\junk):


--- Code: Text ---blat.exe -server smtp.myserver.org -u admin -pw password -to [email protected] -replyto [email protected] -subject "Panic Now, Avoid The Rush!" -bodyF "panic.html" -html -embed "D:\junk\KC.jpg"
If you have the list of clients in a CSV/text file, etc then the command can be wrapped in a DOS command file or PowerShell (for CSV) script and have it send an email to each address, one every 500ms or so.

Limitation of Blat is it doesn't do SSL to the SMTP server but if it's your server then maybe you can get around that.

So goes the theory anyway  :)

4wd:
Possibly something simple like this:

MassBlatter.ps1

--- Code: PowerShell ---$SmtpServer = "smtp.domain.com"$SmtpPort = 25              # If it's required$User = "admin"             # If it's required$Password = "password"      # If it's required$ReplyTo = "[email protected]"$Subject = "Panic Now, Avoid The Rush!"$HtmlBody = ".\panic.html"$Embed = ".\KC.jpg" # You can add more, just comma separate them, insert                    # CID tags in HTML as appropriate$Attachments = ".\file1.zip,.\file2.doc" # Import email addresses from .CSV file$Users = Import-Csv emails.csv # Send email to each address in the listForeach ($User in $Users) {  $ToAddress = $User.Email   $blatArgs = "-server $($SmtpServer) -port $($SmtpPort) -u $($User) -pw $($Password) -to $($ToAddress) `               -replyto $($ReplyTo) -subject `"$($Subject)`" -bodyF $($HtmlBody) -html -embed $($Embed) `               -attach $($Attachments)"   Write-Host "Sending notification to $Name ($ToAddress)" -ForegroundColor Yellow   Start-Process -FilePath .\Blat.exe -ArgumentList $blatArgs -WorkingDirectory . -Wait   Start-Sleep -Milliseconds 500}
Where, (for example):

emails.csv

--- Code: Text [email protected]@[email protected]
panic.html

--- Code: Text ---Dear Client, As you know in this trying time of crazy weather, stupid governments,and incessant bickering relatives, we have now learnt that Natureis out to eliminate us with a virus for all the wrong we have done to the planet. Having looked at this problem logically we have determined that there is really only one coarse of action: <img src="cid:KC.jpg"> Yours Sincerely, Fin Dusinpub
Image as in my post above.

Put MassBlatter.ps1, Blat.exe, panic.html, emails.csv, and any image referenced in the same folder then run the PoSh script, (after editing naturally).

NOTE: I hardly need to point out to you that the ramifications of a plain text user/password - if the server doesn't require them, omit the -u, -pw parameters from the arguments.  Same with the SMTP port - not required, omit it.

DISCLAIMER: Haven't tested it since I don't have access to a SMTP server but the script ran through my test list and printed out the right command parameters ... I'm sure you'd be able to test it locally ;)

PS. WTF do they want a fancy font for?  It's supposed to be serious not an invitation.

PPS. Haven't taken into account spaces in filenames, just don't do it.

Stoic Joker:
Thanks guys, I think I have a plan now.

PS. WTF do they want a fancy font for?  It's supposed to be serious not an invitation.
-4wd (March 20, 2020, 04:57 AM)
--- End quote ---

Best guess is if I could "understand" the answer, I wouldn't be qualified for the job I'm in...  :D

x16wda:
PPS. Haven't taken into account spaces in filenames, just don't do it.
-4wd (March 20, 2020, 04:57 AM)
--- End quote ---
Amen. Spaces in filenames, and hiding file extensions. Idiots.

Navigation

[0] Message Index

[*] Previous page

Go to full version