Email automation example

HI all

Iam trying to execute following sample code of “Email Automation. Mail Trigger Sample.”…iam getting below error ,let me no what changes should i make in program to run
this code

Hi @rohanjs94

Try with either of these ports buddy
IMAP protocol works on two ports:
Port 143 - this is the default IMAP non-encrypted port
Port 993 - this is the port you need to use if you want to connect using IMAP securely

kindly check with servername whether it is entered correctly like
and secureconnection property enabled with value Auto

Hope this would work , kindly revert for any query or suggestions buddy


1 Like

Hi Palani

Thanks for your reply,but still iam finding same issue i haveerror_while_executing uploaded screenshot of error message

Hi @rohanjs94,

Pls first loging to google, go to this link : and turn “less secure app” ON because google by default blocks any device/app which is trying to sign in if the device/app doesn’t meet their security standards.

Check if this works and if it does do turn the “less secure app” OFF again. :sweat_smile:

Hi yogesh

Thanks alot it working .But iam not able to figure out work flow .It will mark it has read automatically all mails. but if subject keyword matches its not popping out .link " Email Automation. Mail Trigger Sample."

Hey @rohanjs94,

It is actually like shooting in dark as I don’t exactly know whats there in your workflow.
But anyway

  • check if you are using just “Subject” use “Subject.ToString()”

  • if you are iterating through the mails (output of Get IMAP mail messages) using foreach then type of variable should be MailMessage and related argument should also be MailMessage

if it doesn’t work please share the file or screenshots

Hope it gets you through.:wink:

1 Like

HI yogesh

Its working now …thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.