Error got sending mail from custom activity

Hi When I am sending mail using using custom activity I am getting error.both code and error mention in screen shot.kindly help me

Hii there,

Did you configure your mail correctly? Seems the connection you are try’ing to make is not valid. Wrong gate perhaps?

PS: IS the mail adress you are try’ng to use connected to outlook? Cause UIpath has Outlook activities which makes it eazy to send mails with.

Greeting,
JR

yes but in out look activity I am not able to set from email id by default it takes my email id.But my requirement is using client email id instead of my

@Joeri_Rethy
yes but in out look activity I am not able to set from email id by default it takes my email id.But my requirement is using client email id instead of my

You can use any ID you like use this command in the TO section:
fwConfig.SelectToken(“ErrorNotifyAddress”).ToString

image

In your config file you can use a json strings like this and create any you wish.
"ErrorNotifyAddress": "rpa@rpa.com",

@Joeri_Rethy thanks for reply but sorry I did not know where config file in application

Make one. Are you already working with the framework? Or making things from 0?

I am new in uipath. @Joeri_Rethy there is only two file one is Main and Project

test.zip (3.1 KB)

Delete the “2” in the config and project .json file

@Joeri_Rethy not work for me

I just need your help. When I am sending mail using using

I am getting error.both code and error mention in screen shot.kindly help me

Hello, @Aditya10989! It looks like you want to send SMTP mail message. In this case, why don’t you try to use the activity which is already available in UiPath Studio:Send SMTP Mail Message?

@AlexandraVeizu thanks for reply.can we send attachment in this.do you have any sample code …?

@Aditya10989

Yes, we can do that also. Click on Attach files and specify below:

Direction: In
Type: String
Value: “FilePath”

image

1 Like

@lakshman thanks for your reply I am try to send from outlook send outlook mail message but in this case in property mail send “To” mention not from.How I can mention email id in from

1 Like

@Aditya10989

You can specify From Mail here. If you can’t specify also no problem it will take default account of that Outlook.

If you want to work with Outlook application and make sure Desktop version of Outlook should be installed in that machine.

@lakshman thanks for reply.when I am adding client email id.I am getting error account not found.

@Aditya10989

Here, you need to add the ‘account used to send messages’ and also it should be configured in outlook and it should be in double quotes.

If you did not enter any email also it will work and it will consider default account and will send mail from that account.

@lakshman right if I did not enter in account by default it is using my outlook account in from mail.but I want to use my client email id in account instead of my id.if I enter client email id then error message account not found.so how it works…?

@Aditya10989

In that case, Enter Client Email Id in ‘SentOnBehalfOfName’ field in double quotes.