commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Mehrwald <mmehrw...@gmx.at>
Subject Re: Mail with attachment
Date Fri, 18 Dec 2009 22:17:54 GMT
Hi Siegfried,

it is not possible for me to say what causes the problem. In fact after
waiting for the first mail to be sent the second one arrives correct. In
my mind it is a feature not a bug because smtp works serial afaik and so
the second mail set to send is too much.
Setting up a mail with an attachment and text reaches the inbox as mail
with no text because it is attached as part 1.2 and two times the
attachment. Unfortunately I deleted my changes by accident. But I
described this a cuple of month ago. Maybe we can find this mail again
which should also explain what I did. Additionally I added UTF-8 to the
charsets.

Regards,
Markus


Siegfried Goeschl schrieb:
> Hi Markus,
> 
> to recapture
> 
> +) the attachment problem was caused by your own code?
> +) what changes did you apply to commons-email-1.1 which still does not
> work with the new release?
> 
> Cheers,
> 
> Siegfried Goeschl
> 
> Markus Mehrwald wrote:
>> Hi Siegfried,
>>
>> I use commons-email 1.1.1 which is actually 1.1 but I did some fixes for
>> the charset and multipart mails (I saw that this problems still occures
>> in 1.2).
>> I put the mail into a queue where my thread (just one) gets them out and
>> send it.
>> Every mail gots its own attachment. I had some code which deletes them
>> but this did not work because my code was faster then the smtp server ;)
>> I have got a workaround now where I get the smtp transport from the
>> session, add the listener and use sendMessage instead of
>> Transport.send() in the commons-email. Now I will be notified if the
>> mail is sent and with that I am able to send the mails in a row. This
>> works for me at the moment.
>>
>> Regards,
>> Markus
>>
>>
>> Siegfried Goeschl schrieb:
>>   
>>> Hi Markus,
>>>
>>> a few questions regarding your problem ....
>>>
>>> +) which commons-email version are you using?
>>> +) are you sending emails across multiple threads (I would assume so)
>>> +) "sending" is a synchronous operation anyway (when considering  mail
>>> transmission to the SMTP server) so serializing is easy
>>> +) are the mail attachment resources shared across multiple emails or
>>> asking the other way around - are the attachments deleted somewhere in
>>> your busing logic
>>>
>>> Cheers,
>>>
>>> Siegfried Goeschl
>>>
>>>  
>>>
>>> Markus Mehrwald wrote:
>>>     
>>>> Hi,
>>>>
>>>> I have a problem with the commons mail package. I send mails with
>>>> attachments but only the attachment from the first mail comes in. The
>>>> second mail is there but without attachment. When I use the debugger it
>>>> works so it seems for me that it is a time problem. Do I have the
>>>> possibility to get informed when the first mail is gone and send then
>>>> the second one?
>>>>
>>>> Thanks,
>>>> Markus
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>>>>   
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>     
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message