![]() ![]() Lib/senders/emails contains layouts, partials, and templates. Sometimes, the HTML version and plaintext version differ very slightly, but as a rule of thumb they should generally match for a consistent experience. Every email has a rich HTML version as well as a plaintext version for users that prefer to see plaintext emails instead. If you want to run CAD (connect another device) emails locally, update dev.json to something like this:Įmails have a "campaign" assigned to them in a key/value map in email.js, as well as a _versions.json file for metrics. 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. ![]()
0 Comments
Leave a Reply. |