it is a wonder app (are you subclassing ERXApplication / ERXSession
etc) ?
if you are then you can create a properties file in your user
directory called WebObjects.properties (/users/simon/
WebObjects.properties for example) and put properties in there. It's
the last one to be read in when your app starts up so it overrides
anything in your apps and frameworks. we always declare ERJavaMail
settings there - particularly "centralise" as that could be a disaster
if it's set wrong !! It's also really useful because different
developers can have different properties without upsetting your source
control, and you can have different properties on your production
server so, for example, you don't have to remember to switch
centralise off each time you install your app.
By the sounds of it, it's worth a clean up of all the various
properties files in your frameworks and apps too. Personally when I
create a new framework or app the first thing I do is delete the
entire contents of the properties file - particularly all the default
wonder stuff - because more often than not I've already g them
declared elsewhere and i don't want any confusion.
so i'd delete anything to do with ERJavaMail from all your current
properties files, create a WebObjects.properties file and stick them
all in there and see if that fixes it.
if it's not a wonder app then i'd definitely make it one :-)
Simon
On 12 Jun 2008, at 11:38, Amedeo Mantica wrote:
Hi Simon
1) Thank you very very much for the help
2) I have the ERJavaMail binary, my Properties are in the Resources
folder of my app, I don't know any other methods:
WebObjects.properties file ?? where????
or in the app properties --- OK i have set er.javamail.centralize =
false
or in the framework properties -- OK, er.javamail.centralize = false
suggestion??
Thanks
Regards
Amedeo
On 11/giu/08, at 23:25, Simon McLean wrote:
Strange... The ERJavaMail shared instance can't see your
properties. Are you running off an ERJavaMail binary, or the wonder
source ? are your properties settings in your WebObjects.properties
file, or in the app properties, or in the framework properties ?
Next step for me would be to download the wonder source and stick
it in your build path so that you can stick some break points in
there and figure out what's going wrong.
Simon
On 11 Jun 2008, at 20:25, Amedeo Mantica wrote:
sure:
ERMailDeliveryHTML mailToEsagono = new ERMailDeliveryHTML();
// Here ERMailDeliveryHTML needs a WOComponent to render the
HTML text content.
mailToEsagono.setComponent(toEsagono);
// Here you create a new instance of the message
// You can loop over this fragment of code, not forgetting to
use newMail ()
// before you set the attributes of the message.
Object[] tempArrayP = new Object[]
{System.getProperty("esagono.email")};
NSArray<String> tempP=new NSArray(tempArrayP);
try {
mailToEsagono.newMail();
mailToEsagono
.setFromAddress(System.getProperty("esagono.from.email"));
mailToEsagono
.setReplyToAddress(System.getProperty("esagono.from.email"));
mailToEsagono.setSubject("Esagono - Richiesta di
contatto");
mailToEsagono.setToAddresses(tempP);
// Send the mail. There is an optional sendMail(boolean) that
optionally blocks during the send.
mailToEsagono.sendMail();
emailSent = true;
} catch (Exception e) {
// handle the exception ...
e.printStackTrace();
System.out.println("Error sending mail to
esagono");
emailSent = false;
}
On 11/giu/08, at 20:50, Simon McLean wrote:
Can you post the actual code ?
Simon
On 11 Jun 2008, at 19:00, Amedeo Mantica wrote:
Hi Simon, it's very strange!
The value is not null !, is exactly the value i put on the
properties file!
Regards
Amedeo
On 11/giu/08, at 16:58, Simon McLean wrote:
Are you sure that property is not getting overridden somewhere
else (like from the default wonder properties) ?
just before your exception do a:
log.debug("My admin email =
"+System.getProperty("er.javamail.adminEmail"));
and check it's value.
i bet it's null, in which case do a full text search for
"adminEmail" and see where else you are declaring it.
Simon
On 11 Jun 2008, at 15:24, David Avendasora wrote:
I ran into exactly this myself a couple months ago when trying
to set it up, but I figured it was just me doing something
wrong and moved on to other more pressing issues.
I was using:
[EMAIL PROTECTED]
So, I don't think it's anything with the parser not liking the
".it", if anyone was thinking that.
Dave
On Jun 11, 2008, at 7:10 AM, Amedeo Mantica wrote:
java.lang.IllegalArgumentException: When setting
'er.javamail.centralize=true' (which means you just test
sending mails), you must also give a valid '[EMAIL PROTECTED]
' to which the mails are sent.
at er.javamail.ERMailDelivery.sendMail(ERMailDelivery.java:
338)
at er.javamail.ERMailDelivery.sendMail(ERMailDelivery.java:
319)
at
net
.esagono
.components.ESContactForm.sendRequest(ESContactForm.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
but...
.
.
# Mail
er.javamail.centralize=false
[EMAIL PROTECTED]
er.javamail.debugEnabled=true
er.javamail.milliSecondsWaitIfSenderOverflowed=6000
er.javamail.smtpHost=192.168.1.4
er.javamail.smtpAuth=false
er.javamail.smtpUser=
er.javamail.smtpPassword=
.
.
.
??? why?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-
[EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/simon_mclean%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/simon_mclean%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/simon_mclean%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/simon_mclean%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]