Hi all,


I (try to) sent mail with ERJavaMail framework.

This is done in my Application class at start time.


The "funny" thing is that the mail is sent when I am in debug after executing the line : message.sendMail();

With normal execution, nothing happens and the mail is not sent !


Is there something that is better initialise where running in debug mode ?

Any idea for fixing this ?


Thanks in advance


Pierre




The code is like this :

WOContext mailContext = new WOContext( new WORequest("GET","/","HTTP/1.0",null,null, null));
Invitation invitation =  (Invitation)pageWithName("Invitation",mailContext);

// set some data in the component
invitation.setXXX
try {
URL logoURL = resourceManager().pathURLForResourceNamed("logo.png", null, null);
URL signatureURL = resourceManager().pathURLForResourceNamed("signature.png", null, null);

File logo = new File(logoURL.toURI());
File signature = new File(signatureURL.toURI());

ERMailAttachment imageLogo = new ERMailFileAttachment("logo.png","<imageLogo>",logo); ERMailAttachment imageSignature = new ERMailFileAttachment("signature.png","<imageSignature>",signature);

ERMailDeliveryHTML message = new ERMailDeliveryHTML();
message.setComponent(invitation);

message.setSubject("My subject");
message.addInlineAttachment(imageLogo);
message.addInlineAttachment(imageSignature);

message.setToAddress("someb...@toto.com");

message.setFromAddress("someb...@titi.com");

// send the mail assynchronously
message.sendMail();
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to