Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How can send Email attachments through code with API wt.mail.EMailMessage.addAttachments ?

$
0
0

String[] strArrayOfString = new String[1]; ;

strArrayOfString[0] = "VR:wt.doc.WTDocument:488784";               // What data type could add reference to the object? It can't work.

strArrayOfString[0] = "D://ptc//Windchill//Windchill//null.log";        // What data type could add reference to the object? It also can't work.

WTUser wtsender = getUserFromUserName("Administrator");

wt.mail.EMailMessage message = wt.mail.EMailMessage.newEMailMessage();

message.setSubject("Mail Subject");

message.addRecipient(user,1);     //recipients paramInt = 1

message.addRecipient(boss,2); //ccRecipients paramInt = 2

message.addAttachments(strArrayOfString);

message.addPart("Mail Content","text/html");

 

Test fail!


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>