Configuration to use sendemail with Gmail in a bash script

Requried packages (in Debian): libio-socket-ssl-perl libnet-ssleay-perl perl sendemail


Variables                                                       
from="username@gmail.com"
to="destination@mail.com"
cc="cc@mail.com"

subject="Subject text"
message="Message text"

server="smtp.gmail.com:587"
user="username"
password="password"

options="tls=yes"

Command
sendemail -f $from -t $to -cc $cc -u "$subject" -m "$message" -s $server -xu $user -xp $password -o $options > /dev/null

PowerShell - Export SQL Data to Excel with Powershell

PowerShell – Export SQL Data to Excel with Powershell

SQL Server  Export  to Excel with Powershell is very useful for all sorts of activities – ETL and reporting are some examples.
This post is to Export SQL Data to Excel with Powershell.In this example, a connection is made to a SQL server Instance using DSN and then SQL output is written to a Excel worksheet.
You can also do a Auto refresh of data, Open the Excel Sheet, Go to Data and click…

View On WordPress

Perl stuff - sendEmail broken by IO::Socket::SSL 1.74
Because I really need my computer to automatically send things to my kindle. x3 Upon upgrading to IO::Socket::SSL 1.74, many Linux and *BSD users will find that sendEmail dies with something like this:
invalid SSL_version specified at .../IO/Socket/SSL.pm line 308.
Fortunately, there is a fix, courtesy of a “Peter Bance”. Just tweak line 1907 in your sendEmail script (this is in “/usr/bin/sendEmail” in debian and ubuntu) from: if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) { to: if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv23:!SSLv2')) {

I’m using:
perl 5.14.2
OpenSSL 1.0.1 14 Mar 2012
…/IO/Socket/SSL.pm: 1.74
sendEmail: 1.56

It’s working fine for me now, but I’ve heard people are still having strange issues in certain use cases.
Jun 10th, 2012 12:34am
Perl Stuff: Trouble with IO::Socket::SSL and sendEmail

Anyone who has tried to use sendEmail on debian or ubuntu in the last year or so has probably encountered this error:

invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332 

Edit: I’m told you can just execute sendEmail with “-o tls=no” instead of removing TLSv1 from SSL_version, so feel free to disregard the rest of this post. =p

Read More

Text
Photo
Quote
Link
Chat
Audio
Video