BrianHepler / MMM-Selfieshot

Taking a Selfie with USB cam on MagicMirror.
MIT License
8 stars 6 forks source link

Email not sending #12

Open J0han3s opened 2 years ago

J0han3s commented 2 years ago

I have tried two different email addresses, but cannot get it to send the email. Not sure which logs to provide? Nothing came up in the console of the chromium browser

BrianHepler commented 2 years ago

I've never tried to use the email function. Which provider are you using? I'll give it a go.

BrianHepler commented 1 year ago

I just played around with this and got a spare Gmail account to work. The steps roughly go like so:

  1. Go to Gmail and click on your account icon in the upper right corner.
  2. Select Manage Account.
  3. Left side, select Security
  4. Center, where it says "Log in to GMail" select App Passwords
  5. Generate an app password of type "other". Call it "magic mirror" or whatever. It will generate a random password for you. This is the password you plug into the config.js file on your mirror. That part of your module configuration should look like this:
sendMail: {
     transport: {
          host: 'smtp.gmail.com',
          port: 465,
          secure: true,
                auth: {
                    user: "[yourGmailAccountName]@gmail.com",
                    pass: "[generatedPasswordGoesHere]"
                    }
     },
          message: {
                    from: "[yourGmailAccount]@gmail.com",
                    to: "destinationEmail@company.com",
                    subject: "Mirror has given Dobbie a selfie!",
                    text: "New selfie has arrived."
          }
}