How to send an email to a default address in a contact form

Hi,
I have created a contact us form in my app and I want to send an email with the input details to a predefined address, in the background, when the user clicks submit. Can anyone point me in the direction of a good tutorial please ? I’ve been looking on line and haven’t found anything I could use. Thanks

You can’t send an email automatically in the background using the phone’s email client. You can open the email client with an email prefilled out using Linking (https://docs.expo.io/versions/latest/workflow/linking/) and providing a typical email link (like one used on a web page):

Linking.openURL(
      `mailto:support@someplace.com?subject=Help Me!`)

If you want to automatically send emails, you’ll need to get a server involved that has access to an SMTP server or a service for sending emails. An example would be a Heroku app with the Mailgun addon: https://elements.heroku.com/addons/mailgun

1 Like