VMware Cloud Community
HariRajan
Hot Shot
Hot Shot
Jump to solution

How to send an attachment over email in vRO 7.3

Hello Team  ,

Appreciate your help on this issue,

I have created a VRO workflow to generate a PDF file based on the request and pushing to file share , I need to send it as an attachment but I am unable to do the same .  I came to know that we no longer cannot write a file to VRO local machine as it is been deprecated in VRO 7.3 Below is the code which i have tried , please help me with a solution.

var mime2 = new MimeAttachment("//10.162.162.12/trust/2395.pdf");

var objEmailMessage;

objEmailMessage = new EmailMessage();

objEmailMessage.fromAddress = "toemail@toemail.com";

objEmailMessage.fromName = "Toemail";

objEmailMessage.smtpHost = "30.92.6.59" ;

objEmailMessage.smtpPort = "25";

objEmailMessage.subject = "test";

objEmailMessage.toAddress = "fromemail@from.com";

objEmailMessage.addMimePart("text", "text/html");

objEmailMessage.addMimePart(MimeAttachment, "application/pdf");

objEmailMessage.sendMessage();

Thanks & Regards in Plenteous . Hari Rajan
Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Hari,

I'm not quite sure what do you mean by "cannot write a file to VRO local machine as it is been deprecated in VRO 7.3". Could you elaborate a bit on this?

Now, on your sample code:

  var mime2 = new MimeAttachment("//10.162.162.12/trust/2395.pdf");

  objEmailMessage.addMimePart(MimeAttachment, "application/pdf");

The second line definitely contains an error - the first parameter should be mime2, not MimeAttachment.

On the first line - what kind of share is this (NFS, CIFS, something else)? Have you tried if the code works if the PDF file attachment is not put on a shared location but is referenced from a local folder on vRO appliance? I haven't tested it with shares but using a local file should definitely work.

View solution in original post

Reply
0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Hari,

I'm not quite sure what do you mean by "cannot write a file to VRO local machine as it is been deprecated in VRO 7.3". Could you elaborate a bit on this?

Now, on your sample code:

  var mime2 = new MimeAttachment("//10.162.162.12/trust/2395.pdf");

  objEmailMessage.addMimePart(MimeAttachment, "application/pdf");

The second line definitely contains an error - the first parameter should be mime2, not MimeAttachment.

On the first line - what kind of share is this (NFS, CIFS, something else)? Have you tried if the code works if the PDF file attachment is not put on a shared location but is referenced from a local folder on vRO appliance? I haven't tested it with shares but using a local file should definitely work.

Reply
0 Kudos