cancel
Showing results for 
Search instead for 
Did you mean: 

Object Email POP3/SMTP

FelixPerez
Level 2
Hi, I want to send mails with Gmail, using Configure and Send Message functions, available in Email POP3/SMTP Object, but when I set the parameters and try to send mail, the process does not respond and throws an error with the SMTP server. However, when I set the same previous parameters in the Configure and Send Message functions inside the object, it works, but loses its sturdiness, having to change the original configuration file to make it work. Could some one help me? Greetings
9 REPLIES 9

ewilson
Staff
Staff
Hi @FelixPerez,

What error are you receiving when you try to send email? I've created a test process and performed the configure and send w/o issue. Below are some screenshots of my process. Make sure you have the proper SMTP server address, port number, and set the two Use SSL flags to True.

Also be aware that if your GMail account has 2-Step Verification enabled you will need to create an app-specific password for your Digital Worker to access the Gmail account. You can find more details here.

20489.png
20490.png
20491.png
Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi Eric, I'm experiencing similar issues. Even after configuring it as you've suggested, I'm still encountering an error. Could you advise on the next steps to resolve this? Thank you.Screenshot 2024-11-11 101752.png

This is the error message 

blazino17_0-1731317678549.png

 

You will need to have a look at the object itself to determine the error here as a compile error usually refers to an error in one or more of the code stages. Open the object and click the errors button to list the errors (screen below with highlighted errors button) you can then read what stage, page the error occurred and what it is, although its not always clear when it comes to code stages.

 

michaeloneil_0-1731318732586.png

 

The error is a compiler error on the Initialize page in Object Studio, indicating that the metadata for 'MailKit.dll' cannot be found at line -21 in the top section of the code.   How do you advise i fix it?

blazino17_0-1731320690857.png

 

looks like you are missing some DLL files, if you go to the asset on the dx Blue Prism Digital Exchange and download the supporting files this will include all the dll files you require. Once downloaded open the zip file and copy all the files inside it to the root folder that blueprism is installed in e.g. C:\Program Files\Blue Prism Limited\Blue Prism Automate

Refresh the object and this should resolve the compile issue.


 
Updating Media

 

 

 

 

 

 

blazino17
Level 5

Thank you so much Michael! The compile issue is now resolved, but when the process reaches the "Send Message" action, it throws a new error (shown below). I've confirmed that my Gmail login details are correct.Screenshot 2024-11-11 124605.png

"Internal : Could not execute code stage because exception thrown by code stage: 535: 5.7.8 Username and Password not accepted. For more information, go to
5.7.8 https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a9ee0ad2dddsm584431266b.90 - gsmtp - 5.7.8 Username and Password not accepted. For more information, go to
5.7.8 https://support.google.com/mail/?p=BadCredentials a640c23a62f3a-a9ee0ad2dddsm584431266b.90 - gsmtp
Stack Trace: at MailKit.Net.Smtp.SmtpClient.<AuthenticateAsync>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MailKit.Net.Smtp.SmtpClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
at MailKit.MailService.Authenticate(Encoding encoding, String userName, String password, CancellationToken cancellationToken)
at Email___POP3_SMTP_IMAP.Send_Message(String Server, Decimal Port, String Username, String Password, Boolean UseSSL, String From, String To, String Subject, String CC, String BCC, String Body, DataTable Attachments, Boolean BodyIsHTML)" 

Hi @blazino17 

Have you generated a blue prism password application from your google account ? 

1000072347.jpg

 

blazino17
Level 5

Hi Mohamad, I just did that and it worked. Thank you so much.