cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Mail Server - SendMessageWithAttachment parameters

khayes1
15-Moonstone

Mail Server - SendMessageWithAttachment parameters

Hi,

is anyone familiar with how to use the parameters in the mail server SendMessageWithAttachment service. Tried a number of versions but still getting errors. I'm trying to send an attachment file called 'My Notes.docx" which is in a folder called 'Documents" in a file repository called "Document.File.Repository" Currently my set up is as shown below

var params = {
     cc: undefined /* STRING */,
     path: "\/Documents\/My Notes.docx" /* STRING */,
     bcc: "me@gmail.com" /* STRING */
     subject: "Developer Notes"/* STRING */,
     to: "recipient@gmail.com" /* STRING */,
     fileRepository: "Document.File.Repository" /* THINGNAME */,
     from: "me@gmail.com" /* STRING */,
     attachmentName: "My Notes.docx" /* STRING */,
     mimeType: ".doc" /* STRING */,
     body: "This is a test"
};
Things["Linx.MailServer"].SendMessageWithAttachment(params);

 

When I try to use these parameters I get the following error -  JavaException: javax.mail.internet.ParseException: Expected '/', got null 

 

I'm particularly keen to understand

  • is the 'path' value supposed to include the path and the file
  • inside a path string do I have to add a backslash before any forward slash

Thanks in advance,

K

ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:slangley)

Hi @khayes1.

 

Please take a look at the online Help.

 

If you still have issues, please provide the ThingWorx version you are running and confirm the Mail Server in use.

 

Regards.

 

--Sharon

View solution in original post

3 REPLIES 3
slangley
23-Emerald II
(To:khayes1)

Hi @khayes1.

 

Thank you for posting your question on the community.  We are working to address your question.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @khayes1.

 

Please take a look at the online Help.

 

If you still have issues, please provide the ThingWorx version you are running and confirm the Mail Server in use.

 

Regards.

 

--Sharon

khayes1
15-Moonstone
(To:slangley)

Thank you, looks like the information I was looking for.

K

Announcements


Top Tags