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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Mail Server - SendMessageWithAttachment parameters

khayes1
13-Aquamarine

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

1 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
13-Aquamarine
(To:slangley)

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

K

Top Tags