Sending Email Using VB Script Code in Uipath

Hi Guys,
I am new to UiPath need some input and suggestions
i am trying send email using by using VB Script.

I am using InvokeCode and Invoke VBscript activities but not working.

My requirement is email reply should go to particular email id not to the sender

Can anyone please help

’ VBScript to Send Email Notification
’ Author:
’ Usage: cscript.exe sendemail.vbs email subject text
’ 23/Dec/2014

Sub SendEmail(ToAddress, Subject, Text)
Dim iMsg
Dim iConf
Dim Flds

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1
Set Flds = iConf.Fields

With Flds
    .Item("") = True
    .Item("") = 1
    .Item("") = ""
    .Item("") = "password"
    .Item("") = "" 'smtp mail server
    .Item("") = 2
    .Item("") = 465 'stmp server
End With

With iMsg
    Set .Configuration = iConf
    .To = ToAddress
    .From = ""
    .Subject = Subject
    .TextBody = Text
    .AddAttachment "C:\Users\Golden\Documents\CEIPAL_Resumes\img20200707_21255890-converted-compressed.pdf"		
End With

Set iMsg = Nothing
Set iConf = Nothing

End Sub

If WScript.Arguments.Count <> 3 Then
WScript.Echo “Usage: cscript.exe " & WScript.ScriptFullName & " email subject text”
SendEmail WScript.Arguments(0), WScript.Arguments(1), WScript.Arguments(2)
End If


Instead of using VB Script you can use already developed activities

Try using Send SMTP Message activity

We need to use invoke code when there are no activities

Mark as solution if this helps


Please try using UiPath outlook activities and UiPath Mail activities

When person reply back to the email it(reply) should go different email id not to the “FROM” email
address.In image we can reply-to email id is different compare to From email id