On 09/06/2013 12:37 AM, Νίκος - Support wrote:> Στις 6/9/2013 10:20 πμ,
ο/η Todd έγραψε:
> Hello Todd,
>
> Do i download them from Google? What
> their use?
> i don't user FF i use Chrome instead.
>
> Please elaborate.
Certainly! gmail and zmail (
zoho.com) are both huge
pains in the --- to get working from a script.
Hi Νίκος,
The batch script is how to send "From:" a gmail
account with a batch script using mailx. The
"To:" can be anyone.
I also have a script to do the same thing from a
zoho account (zmail), if anyone wants it.
First let me write the comments in my batch file a little better.
Remember, this BASH script is a only for sending from a script
through gMail.
-------- cat MailxTest.gmail -----------
#!/bin/bash
#
echo "mailx test" | mailx -v -s `dnsdomainname`" gmail smtp test subject" \
-S smtp-use-starttls \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp=smtp://
smtp.gmail.com:587 \
-S from=
From_emai...@gmail.com \
-S smtp-auth-user=
From_emai...@gmail.com \
-S smtp-auth-password="From_email_password" \
-S nss-config-dir=/home/linuxutil/mailcerts/ \
To_email...@gmail.com
---------------------------------------------------
> i want to try your example but i don't know where i'm
> supposed to find the cert* and key* files.
You will find them in your gMail profile. Your profile
is in your home directory under
$HOME/.mozilla/firefox/your_profiles_cypher_name
1) install firefox
2) start firefox and let it automatically create its first
profile
3) open a terminal/xterm in your home directory
4) search for the certificates with
find $HOME/.mozilla/firefox -iname \*cert\*.db
remember to copy all the *.db's over from your profile
to a separate directory. Mine are:
cert7.db cert8.db key3.db secmod.db
Firefox needs these certificates to do the "s" in https
5) modify "nss-config-dir=/home/linuxutil/mailcerts/" in
the above script to match the directory you copied the
certificates to
> What are the mailcerts anyway?
gMail uses SSL (secure socket layer or the "s" in https) and
need these certificates to authenticate. So does zmail, but
uses a different sign in method.
> The code above is supposed to be use in a file called
> 'MailxTest.gmail'
This is a Bash script. The first line in the script "#!/bin/bash"
tells you this.
> not from within a python script i have called 'mail.py' ?
No. Not to a Python script. Get it working in Bash first,
them translate it to Python. YOUR PYTHON SUBROUTINE WILL NEED
THESE CERTIFICATES TOO! If you can get it working in BASH,
you are 90% of the way there.
> Also what is the other thing at the end
>
you_other_e...@gmail.com
My bad. I should have said it was the gMail "To"
address, which can be anyone.
Good luck, I am dying to know if this helped you or
anyone else. I am usually the one asking the questions.
-T
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~