I am having a PHP web application with SendGrid integration for both incoming (parse webhook) and outcoming mail (PHP mail()
with system configuration for mail proxy). Currently our incoming mail system consists of an endpoint, which saves all contact emails to our database. We want also to have some direct email forwarding mappings to other mail providers (like ceo@mysite.com => my.address@example.com).
As far as I know, there is no routing of email or forwarding them with SMTP protocol in SendGrid's side, only plain API calls connecting to our endpoint. Creating MX records pointing to our IP address is not an option, as we don't want to reveal our servers' origin IP address to the public (DDoS risk).
Should I just write code to get the contents of email and mail()
it forward? Some data will be missing, but for the most part it should work. Or is there a way to connect something like a Gmail Business account to listen for mails for these specific addresses?