11

Send an e-mail from a script in batches. Blat does not work

 3 years ago
source link: https://www.codesd.com/item/send-an-e-mail-from-a-script-in-batches-blat-does-not-work.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Send an e-mail from a script in batches. Blat does not work

advertisements

I need to send an email from a batch script. I tried several solutions without success.

For example, with Blat:

:send_mail
"\Program Files (x86)\blat275\full\blat.exe"
    -server smtp.gmail.com
    -port 525
    -f [email protected]
    -to [email protected]
    -s "hello"
    -body "world"

When I run the script, I just get a Windows crash:

55Cf4.jpg

Does someone have a better solution?

EDIT & SOLUTION

I tried on our server (with our smtp) and it worked with Blat. See the full code in my answer below.


Realize this is old, but for any googlers:

Blat will NOT work with gmail, as it requires an SSL connection to be accessed over SMTP, which blat doesn't (as of 06/02/2013) support

See here: http://www.jeffkastner.com/2010/01/blat-stunnel-and-gmail/ for a (slightly messy) workaround.

Related Articles

injecting javascript into cshtml from a partial view using RenderSection does not work

I have a partial view, that requires some javascript at the bottom of the page. The main page: ...some html... <div> @Html.Partial("_myPartial") </div> ....more html.... //required JS at BOTTOM - THIS should also come from above part

C # send & amp; Receive messages via NetworkStream & mdash; Simple code, but does not work as expected

I am trying to write a small C# application that will be able to send and receive encrypted messages in a client/server manner. This MSDN example is pretty close to something I need (just to get the basic functionality) http://msdn.microsoft.com/en-u

Open the Android app from the URL using intention-filter does not work

I have an Android app that people use as a replacement for a website. Hence, when users encounter an URL to the website, I want to give them the option to "open the URL" in my app instead of in the browser. In other words I want the popup to app

why my script in the unit does not work

I made 2 scripts and assigned it to 2 cubes: "cube" and "cube 1". Normally if you click on cube it sets a value so that when you click cube 1 it disappears. If you click cube 1 first it's not gonna work. So that's what I tried to make

The html e-mail sent from the text Outlook-align left does not work in gmail IE

I know this question is asked before and I think I almost tried everything that others have suggested. But here is my problem: I have to send the html e-mail with Outlook (not in a browser, part of the office suite), that's not a choice. I use tables

script bash with kdialog does not work from cron

I am trying to run a bash script from cron, but nothing seems to work. Script: #!/bin/sh printf '%s' $(date) '_END' >> battery_log.txt export DISPLAY=:0 kdialog --msgbox "$(upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "s

Simple connection script - connection to encryption does not work when connecting

I'm trying to make a very basic login script using PHP. I am aware that the system, as of now, is very open to SQL injection and isn't secure and all that jazz. I'm more trying to get a baseline down before I jump into security. So I have a script th

Sending the variable as an argument using the escape character does not work

sending variable as argument is not working in this code document.write('<input type="text" id="argument">'); var testArg = document.getElementById('argument').value; document.write('<button onclick="sendArg(\'' + testArg

The minified script with the grouping does not work in ASP.NET MVC 3 when debugging is disabled

My web application works fine with bundled script until <compilation debug="true" /> is set. If I set the debugging to false, my custom script become minified and then just stop working. I can reproduce this trouble on different browsers,

Converting the date from the string to the date does not work with dateFormatter and Swift

This question already has an answer here: swift NSDateFormatter not working 1 answer This question is not a copy of another: I have an issue that I don't find somewhere else. I want to convert a date as String to the Date format. This String date is

validation script for radio button does not work

I am getting errors. The script is not working. Help thanks in advance. I want to check if all my set of radio buttons are checked when button next is click. other ways of doing this also are welcome <div class="qheader"> 9) What's the wor

script installed under crontab does not work

I have been writing housekeeping script , now i need to install housekeeping script as a cronjob on both staging and production environment. i could do it on the staging without a problem and it gives me expected output. when i run it on the producti

When, when sending an e-mail of 19mb zip file size, it does not emit e-mail?

This is in my new class top: MailMessage photosmessage; This is the method i have in my new class: public void SendPhotos(string fileNameToSend) { try { MailAddress from = new MailAddress("[email protected]", "User " + (char)0xD8 + &

The simple script executed via cronjob does not work but runs from a shell

I am on shared hosting and I'm trying to schedule cronjob to run every now and then. Via cPanel I scheduled to execute my script but even though that according to my host support the cronjob runs, the script doesn't seem as doing anything. The cron j

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK