Sending Email on Else condition

Hello

Am trying to practice on a small project of mine and i got stuck at a point where if there is no attachment or the title is wrong, i need it when it meets the “else” condition to send an Email to them telling them their email haven’t met the requirements

So in your else section, you can use send outlook message with the relevant details.

To identify if there attachments you can use item.Attachments.count > 0.

1 Like

Thanks A lot for helping me out the item.Attachments.count > 0. worked like charm, but the send outlook message i need to send it as gmail and that for am now using send SMTP Mail Message
but now getting a new error “Send SMTP Mail Message: The specified string is not in the form required for an e-mail address.”

Remove the double quotes from TO
Use

item.from

1 Like

just did and it gave me this error
Error ERROR Validation Error Compiler error(s) encountered processing expression “item.from”.Value of type ‘System.Net.Mail.MailAddress’ cannot be converted to ‘String’. Main.xaml

item.from.tostring

1 Like

that did work, Only to appear other error
Send SMTP Mail Message: The specified string is not in the form required for an e-mail address.
if need anymore info or pic for something please let me know, i really appreciate this help

Can you post the image of properties of send mail activity

1 Like

Done

@Medhat check your email address is in proper format or not.

1 Like

it is, the part of condition (then) works like charm already , its only the ‘else’ part is where am facing the trouble (this is the Email address “t1e1s1to123@gmail.com” ) its just for a test/practices

@Medhat In properties panel of SMTP mail message activity use To = item.From.Address

Hope this helps you

1 Like

@Vrushali_Gave It did work … Thank you soo soo much, And thanks everyone of you all

2 Likes

Hi @Medhat

Always mark as solution to the post which worked/helped for you.
In this case @Vrushali_Gave post helped to solve your query.

I am telling this bcz if anyone else face the same issue/query in future then they will directly get pointout to the exact solution.

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

2 Likes

Yes exactly …
@Pratik_Wavhal Thank you…

1 Like

Done Marked it as solution Thanks again @Pratik_Wavhal

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