Automatically send email when macro completes

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jpf1281
Newbie
Posts: 12
Joined: Mon Jun 14, 2021 1:40 pm

Automatically send email when macro completes

Post by jpf1281 » Mon Jun 14, 2021 2:37 pm

I am trying to send a simple email message when a script completes. I am using Gmail and have tried the format of the example in the help docs. I still Cannot get this to work, and I am not sure what I am missing.

Let>SMTP_AUTH=1
Let>SMTP_USERID=[email protected]
Let>SMTP_PASSWORD=xxxxx
Let>SMTP_PORT=465
Let>SMTP_SSL=1
SMTPSendMail>[email protected](receiving email),smtp.gmail.com,[email protected](sending email),Automations,test,hello world,

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1380
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Automatically send email when macro completes

Post by Dorian (MJT support) » Mon Jun 14, 2021 3:57 pm

For gmail you may need to enable 'less secure' apps and/or you might also need to create an app password:
https://support.google.com/accounts/ans ... 0255?hl=en
Yes, we have a Custom Scripting Service. Message me or go here

jpf1281
Newbie
Posts: 12
Joined: Mon Jun 14, 2021 1:40 pm

Re: Automatically send email when macro completes

Post by jpf1281 » Mon Jun 14, 2021 8:16 pm

That did it. Appreciate the help!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1380
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Automatically send email when macro completes

Post by Dorian (MJT support) » Mon Jun 14, 2021 8:33 pm

Always happy to help.
Yes, we have a Custom Scripting Service. Message me or go here

jpf1281
Newbie
Posts: 12
Joined: Mon Jun 14, 2021 1:40 pm

Re: Automatically send email when macro completes

Post by jpf1281 » Wed Jun 23, 2021 5:26 pm

I was just informed that we are looking to do this with Outlook as well, is there any setting similar to Google that I need to change somewhere to get it to work? I have the macro set up with all of the correct info for Outlook, but that is not working.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1380
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Automatically send email when macro completes

Post by Dorian (MJT support) » Wed Jun 23, 2021 6:05 pm

If it's Office 365 you could try something like this.

Code: Select all

Let>server=smtp.office365.com
Let>SMTP_AUTH=1
Let>[email protected]
Let>SMTP_PASSWORD=Password
Let>SMTP_PORT=587
Let>SMTP_SSL=1
Let>SMTP_USETLS=3

Let>subject=Hello
Let>body=Please find the attached

Let>[email protected]
Let>myname=John Smith

Let>attach=C:\myfile.txt
Let>[email protected]

SMTPSendMail>recipients,server,me,myname,subject,body,attach
Yes, we have a Custom Scripting Service. Message me or go here

jpf1281
Newbie
Posts: 12
Joined: Mon Jun 14, 2021 1:40 pm

Re: Automatically send email when macro completes

Post by jpf1281 » Thu Jun 24, 2021 4:51 pm

Perfect this worked, thanks again!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts