Sending SMTP mail to one provider for multiple domain recipients
I have a straight forward Java mailer program using Jakarta Mail API to send emails. In case no SMTP hosting server is specified, I take the first recipient from the TO: field to search the highest priority MX record to send the email.