1

Working on Mule 3.8

For emailService with attachment I have referred one of the earlier post (question) (how to upload a file and json data in postman) which has answer by @gce user. I followed the same. But now I am facing different issue. My JSON data is also getting considered as an attachment. How to avoid this inboundAttachment from getting attached to email. I am using simple SMTP component for sending emails.

Tried to use componenet attachment and triued to remove this attachment forcefully but it is still getting attached. @Gaurav Sharma How you avoid the JSON data from getting attached to email? This is the earlier post for reference

JavaDev
  • 51
  • 1
  • 5

1 Answers1

0

This is expected since you are sending json in form/data as seen in the image.
form/data will always send as attachment.
Try sending it as raw in the body part of postman:
enter image description here

Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
  • I want to send attachment as well as JSON data. JSON data may contain long list of email recipients (including To, CC, Bcc). So I am sending it as a text in form-data. I am afraid to send all this info in header parameters as if limit exceeds my API will fail. Can you kindly suggest any other way to do it to avoid this text data getting attached to email? – JavaDev Aug 21 '19 at 06:59
  • I cant avoid using text. If in this case is it Mulesoft design which consider everthing as attachment when it comes in forma of form-data? then what approch should be taken while designing an notificationService with attachments when we notification data (like To/From/subject) is also dynamic? – JavaDev Oct 07 '19 at 04:38