i as root just installed
sendmail and mailx. i have edited the ~/.mailrc to use:
nikos@superhost.gr [~/www/cgi-bin]# cat ~/.mailrc
account gmail {
set smtp-use-starttls
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=may)gmail
set smtp-auth-password=my_gmail_pass_not_stupid_enough_to_wite _it_again
}
And now i'm trying to:
cmd = "echo %s | mailx -A gmail -r %s -s %s %s" % (MESSAGE, FROM, SUBJECT, TO)
p=subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE )
output, errors = p.communicate()
print( errors, output )
Any ideas please why this fails to work?
while i remove the '-A gmail' string in the cmd line then i can send fast mail but only to mail containing the @superhost.gr trail.
i need to be eble to send to external mails to.
=============
Even trying it from the shell that is, 'mailx' fails to delivers my test mails.
Can one help me configure sendmail properly?
mailX == an MUA == a Mail Client right?
sendmail == MTA == program that is responsilble to send mails?
So, i gather 'mailx' does use 'sendmail' to send mail yes?
can you provide me a working mail exmaple that works?
Why i can only send mail to local server addresses an not to an external mail address?