handle the attachment via mail

Hi All,

I want to send a mail with attachment(.zip file) using smtp.

If attachment size is less than 10 MB then the mail is sent and received with an attachment

but for more than 10 MB, smtp call is success with status “Mail was sent successfully.” but no mail is received .

how do handle the error if mail is not send/received.

Please help me to resolve this.

Thanks in advance.

What is the size of the attachment after .zip?

Some times email server filters/block messages which have huge attachment files. If that is the case then you can speak to the email server team. Also check your spam or junk email.

Yes could be issue with blocking or zip file restrictions etc…can you touch base with your exchange team also?

Also can you test with smaller zip file just to be safe?


As the attachement(.zip) less than 10MB is sent successfully, its clear that the restriction on the size.

This 10MB is the default limit set by most of the Mail hosts, just to have a threshold on the spamming of their disk space.

The mail which you sent to Mail host is successfull technically. But as the host rejected its not further sent to the mail box.

You can change the setting of this 10MB in the SMTP server. Its a configurable setting. There were cases where ~25MB files are sent across mails.

Hi All,

Thanks for your response.

I am trying to send zipped file only.

I can understand that SMTP server can’t process more than 10MB file.

what I want is if mail not received(if >10 MB) then I need an acknowledgment that mail was not received instead of “Mail was sent successfully.” in the smtp service output status.

I understand your point but when you get the message “Mail was sent successfully.” did you check with your email sever/exchange team whether did they receive it successfully and then filtered or ignored.

Have a technical discussion with them on this for solution and understanding of the issue.

Hi Mahesh,

Is there any other alternate way to handle this without asking email server team.

Nope :frowning: Lets see what others say.

try using properties in the pub.client:smtp service -

name - mail.smtp.reportsuccess
value - (boolean) TRUE

See the output, if you get any message with the status as failed or something like that.


Just wondering!

What does the name does you suggested and which exact key/value you set specifically in the smtp service?

name - mail.smtp.reportsuccess


Thanks all for your response,

My mail server accepts 15 MB, for the time being in code I checked the size of file before sending mail.

I am sending mail if size is less than or equal 15 MB.

Kindly let me know if any alternate solution.

I’m suggesting to use the smtp property (mail.smtp.reportsuccess) in the properties of smtp service.

Below lines from documentation -

properties Document List Optional. SMTP system properties to send to the SMTP
server. This parameter overrides the settings on the
watt.config.systemProperties configuration parameter. If you omit this
properties parameter, Integration Server uses the settings specified on
the watt.config.systemProperties configuration parameter.
Key Description
name Name of the SMTP system property.
value Value to specify for the SMTP property.

Hi Naidu Karri,

The service is throwing an exception when I set this property(mail.smtp.reportsuccess=TRUE/True/true)

Kindly let me know, from where /which document you refer this property so that I could go through it.

I found this property is my notes. This property was used in case smtp call through java, not through webMethods though. So, I was just asking you to TRY.

If its not working, I would suggest you get in touch with the SMTP server admin, to know which properties are accepted by the server.

From documentation its clear that, we have option of setting the properties during the call. Catch would be in knowing that property.