WebApp needs to send emails via mail account

kg flag

I have a web app running on a shared server account for the domain The web app needs to send the occasional email to the app adminstrator.

The domain is using as the email server.

How can I either:

a) Configure the web app to send emails via an mail account (can you point me to the instructions/settings to configure this?), or

b) Configure the included mail server for the domain to send emails even though the domain is configured to use (I do not think this option is possible), or

c) Purchase an additional domain, add it to the same "account", and access it from the web app running on

Has anyone done this, and can you point me in the right direction re configuration recipe?

in flag

One of the reasons its difficult to find information about this is because Microsoft keeps changing its API. For example, these two links show an API in change, that works now but will be obsolete in a few months.

this one

and this one

If you can't get this working, here's another idea:

Register another domain (e.g. and add it to your hosting account as an add-on domain. Because it's part of the same hosting account, the primary domain can send email through it bypassing the servers entirely.

Here's what the config would look like under NodeJS:

First, you would need to install the nodemailer package.

Then, in your App.js (or whatever you called your backend file):

const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
    host: '',
    port: 465,
    secure: true,
    auth: {
       user: '',
       pass: 's3cr3tPassword',
    tls: {
       rejectUnauthorized: false,

Of course, you would need to create a mailbox for the user specified in your code ( / s3cr3tPassword).

I've done this before, specifically to get around the need to send emails through the Microsoft Office365 environment, and it worked for me.


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.