On Thu, May 05, 2022 at 11:24:36AM -0500, x...@trimaso.com.mx wrote:
printf "%b\n" "$msg" | mutt -s "Test message" -e "set my_user=u...@domain.tld; set my_url=smtp.domain.tld; set from='User'; set use_from=yes; set smtp_url=smtp://$my_user@$my_url; set smtp_pass=p4ss; set ssl_starttls=yes; set ssl_force_tls=yes" recei...@domain.tld

Two general suggestions to try:

1) On the command line, the shell will expand shell variables inside double quoted strings, before Mutt even sees it.

So in the part "set smtp_url=smtp://$my_user@$my_url" Mutt is probably only seeing "set smtp_url=smtp://@", because $my_user and $my_url are unset in your shell. You may want to use single-quotes around the whole "-e" expression, but then be careful with nested single quotes, e.g. the set from='User' part.

Alternatively, consider using the 'source' command and putting the configs into a file.

2) You most likely *do* want to set a port number in $smtp_url, as you've done below, e.g. smtp://xxx:587 or smtps://xxx:465.


[Since you're new to Mutt, I'll also gently remind to please reply to the mailing list, not to me directly.]

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to