Configure Sendmail with Sendgrid for SmartHost Mail Relay
Submitted by system on Mon, 03/11/2024 - 13:32Set the authorization credentials in /etc/mail/access
AuthInfo:smtp.sendgrid.net "U:apikey" "P:<yourAPIKey>" "M:PLAIN"
Define the Smart Host in /etc/mail/sendmail.mc.
You should add these lines just after the commented \#dnl define('SMART_HOST', 'smtp.your.provider')dnl
line in the file. In Ubuntu these would be the last lines added to the file.