[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] msmtp and gmail smtp



SOLVED!!! :)
had to add to change my .muttrc to show:
set sendmail="/usr/local/bin/msmtp --read-envelope-from".
I then deleted account default from my .msmtp and now email is sent with the correct From: user (1,2)

Mike

On Mon, Jun 14, 2010 at 2:36 PM, Michael <beriah@...234.....232...> wrote:
oops, sorry Martin, I didn't catch the address in time :(


ok, thanks. Here is what I did:
uncommented each user (1,2) account and then commented out the default account and tried to send email.
I got this response:
msmtp: account default not found in /home/mike/.msmtprc

So I uncommented the #account default line so all it had was:
account default

Tried sending email, and I got:
msmtp: account default from /home/mike/.msmtprc: envelope-from address is missing

btw- this is mutt 1.5.20 and msmtp 1.4.19

Thanks for your help.




On Mon, Jun 14, 2010 at 1:30 PM, Martin Lambers <marlam@...235.....> wrote:
On 14/06/10 19:31, Michael wrote:
> My .muttrc contains:
> macro generic "<esc>1" ":set from=user1@...233... <mailto:user1@...233...>"
> macro generic "<esc>2" ":set from=user2@...233... <mailto:user2@...233...>"

In the configuration file you sent, you only define a single account
(there is only one 'account' command active), and you define all the
settings for this account in your 'defaults' section.

This does not work. You need to define two accounts and let msmtp choose
the account that has the matching from address.

For example:

----
defaults
host smtp.gmail.com
port 587
keepbcc on
tls on
tls_trust_file /etc/ssl/cert.pem
logfile ~/.msmtp.log
auth on

account user1
from user1@...233...
user user1@...233...
password xxxxxx

account user2
from user2@...233...
user user2@...233...
password xxxxx
----

(You can still optionally set a default account with 'account default :
user1', but you don't need to if you only use msmtp with Mutt).

Martin

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
msmtp-users mailing list