I need to send emails form a script where the SMTP I want to send by varies per message. Using mailx, one may specify the SMTP server, TLS options, username, and password on the command line. However, I need to send embedded HTML emails (not as attachment), and mailx does not support that, according to various posts I've found and time spent pulling my hair out trying to get it to work. On the other hand, with sendmail I can send embedded HTML, but it seems the SMTP server options have to be in a config file, and I don't know how to override them from the command line. So how do I send embedded HTML while specifying custom SMTP options?
sendmail: specify SMTP server and TLS options per message
1.4k views Asked by Display Name At
1
There are 1 answers
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in EMAIL
- Email Verification python eror
- Invalid format for email address in WordPress on Azure app service
- How to create an JSOUP element from byte array image (Load from Database)
- How can I look this email address
- Gsheet - Automatically send an email using a date & time in a Cell
- Install Postfix Mail Server
- Error 553 5.7.2 [TSS09] When Sending Emails to Yahoo and Outlook
- How to make my form send the submitted info to my email
- Cpanel filter encoding utf-8?
- Thunderbird Importing Emails imports 0 emails
- Python & Django web app - auto emails not sending
- Allowing any member of a dynamic group to send as from a shared mailbox
- How to fix "search in state AUTH" errror
- Rewriting CSS in MSO conditional comment doesn't work
- Sendgrid attachments in C#
Related Questions in SMTP
- smtplib send email with set email image
- Error: Mail command failed: 530 5.7.57 Client not authenticated to send mail
- Sending email in django using smtp
- ASP.NET Core 6 Web API : best way to pause before resending email
- sending mail rejected due to TLS verification
- What does this mean "Error connecting to SMTP server: (421, b'Service not available')"
- Z3 to solve a puzzle(8 blocks tiles) please?
- Is it possible to encrypt WordPress E-Mails with S/MIME?
- Laravel gmail smtp not sending email on live server
- How to use git-credential-gopass with git send-email?
- Try Send Smtp in godaddy
- Can't connect to SMTP server using TLS
- AuthenticationFailedException while sending mail using google service account
- Troubleshooting SMTP Error 504 When Sending Email with Attachment
- unable to send email notification from jenkins
Related Questions in SENDMAIL
- Connection timed out error with smtp.gmail.com
- I'm having trouble sending emails on Django using SMTP. Even after trying various tutorials and checking the documentation, nothing seems to work
- Golang email not proper format on the body with template
- SELinux is preventing /usr/sbin/sendmail.postfix from read access on the file
- i can not send Email in Xamarin form
- Error Msg 22050, Level 16, State 1, Line 0 Failed to initialize sqlcmd library with error number -2147467259
- smtplib.SMTPServerDisconnected: Connection unexpectedly closed and i can't fix it
- Django project is not sending confirmation email
- laravel queue works in postman but not in browser
- Retrieve messageId when sending mails with graph api
- SMTPResponseException smtplib.SMTPResponseException: (334, b'UGFzc3dvcmQ6')
- I need to receive email if any cell in column H =1 with subject include the data from A,B and h. From the same raw
- Send email from Google Sheet when cell is is =1 by using apps script
- Sendmail issues sending to a relay server
- string variable not being recognized in replyTo argument for sendmail
Related Questions in MAILX
- Linux Attach Multiple files Using Mailx
- unable to send email from linux CentOS 7 using postfix
- Sendmail syntax question when upgrading to RH9
- Problem with Oracle EBS concurrent program calling mailx
- Mailx Command Attempts to Send mail to Server/Node
- Using mailx in a bash script running under systemd
- email command in Linux mailx doesn't recognize the sender email syntax
- How to write bash script to send email alerts with an attachment in CentOS 7?
- Send mail to external SMTP server (linux command)
- Sending email to a list of users using mailx in subprocess
- How to format the email content using mailx command
- Sending file as attachment using mailx command
- Having issues to sending emails with attachment
- Triggering a mail through Unix Script
- mailx - sending zip files
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I gather you're looking for a low-level solution, but this is so straightforward in Python that I think it's worth exploring. There are several examples of literally exactly what you're trying to do right here in the documentation.
I also answered a similar question here.
Even if you're unfamiliar with Python, those docs pages pretty much spell out the whole program for you.