
Almost every email can be triggered locally by walking through the flow locally to trigger an email, but certain environment variables may be different across staging and production than they are locally. Triggering emails locally Ĭheck out creating an account locally as well as our local emails with MailDev docs. Ultimately each of these methods calls send, which in turn calls the nuts-and-bolts methods localize, render, selectEmailServices and sendMail. Those are defined in lib/senders/email.js and don’t have send in the name, so verifyEmail, newDeviceLoginEmail and passwordResetEmail would be counterparts to the above. The methods are defined by a reducer in lib/senders/index.js and have names like sendVerifyEmail, sendNewDeviceLoginEmail and sendPasswordResetEmail, but those are really just thin wrappers that do a little bit of argument marshalling before handing off to other methods that actually do the work. FxA uses nodemailer and AWS SES to send its emails.Įmails are sent by calling methods on the mailer object that are passed around the codebase.


All of the code for sending email lives in the fxa-auth-server.
