• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERJavaMail - work only in debug !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERJavaMail - work only in debug !


  • Subject: Re: ERJavaMail - work only in debug !
  • From: Jesse Tayler <email@hidden>
  • Date: Thu, 27 Sep 2012 10:33:29 -0400

maybe user-permissions issues?

are you certain you can send as the user who's running WO and all?

On Sep 27, 2012, at 6:05 AM, Pierre Gilquin <email@hidden> wrote:

> 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("email@hidden");
>
> message.setFromAddress("email@hidden");
>
> // send the mail assynchronously
> message.sendMail();
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ERJavaMail - work only in debug !
      • From: Pierre Gilquin <email@hidden>
    • Re: ERJavaMail - work only in debug !
      • From: Pierre Gilquin <email@hidden>
References: 
 >ERJavaMail - work only in debug ! (From: Pierre Gilquin <email@hidden>)

  • Prev by Date: Re: Callstacks in jenkins-built apps without line numbers
  • Next by Date: Re: Callstacks in jenkins-built apps without line numbers
  • Previous by thread: ERJavaMail - work only in debug !
  • Next by thread: Re: ERJavaMail - work only in debug !
  • Index(es):
    • Date
    • Thread