Tom,
I am trying to run Javamail_Hello world program and am getting "javax.mail.MessagingException: Could not connect to
TransportSend Error " error.
My inputs are as follows:
//main pgm
msg = AirEmail_newMessage('myusername':'mypwd');
//service pgm
D svDefaultHost C CONST('gmail.com')
'
'
svHost = svDefaultHost;
'
'
// Host: URL Location of the SMTP server
svPropKey = new_String('mail.host');
svPropValue = new_String(%trim(svHost));
Properties_setProperty(svProp: svPropKey: svPropValue);
// LocalHost: Required or HELO will fail
svPropKey = new_String('mail.smtp.host');
svPropValue = new_String('smtp.gmail.com');
Properties_setProperty(svProp: svPropKey: svPropValue);
The reason I am using gmail server is that I am unaware of my companies mail servers url&host name.
I have pinged gmail.com from my IBM i and it succeeds(I can access gmail from my company network). I added couple of properties by referring
http://www.mkyong.com/java/javamail-...-smtp-example/ to our service program but it still fails.
Could you please tell what I am doing wrong? and what is the difference between mail.smtp.host and mail.host
properties exactly??
Sorry to bother you,
-David
I am trying to run Javamail_Hello world program and am getting "javax.mail.MessagingException: Could not connect to
TransportSend Error " error.
My inputs are as follows:
//main pgm
msg = AirEmail_newMessage('myusername':'mypwd');
//service pgm
D svDefaultHost C CONST('gmail.com')
'
'
svHost = svDefaultHost;
'
'
// Host: URL Location of the SMTP server
svPropKey = new_String('mail.host');
svPropValue = new_String(%trim(svHost));
Properties_setProperty(svProp: svPropKey: svPropValue);
// LocalHost: Required or HELO will fail
svPropKey = new_String('mail.smtp.host');
svPropValue = new_String('smtp.gmail.com');
Properties_setProperty(svProp: svPropKey: svPropValue);
The reason I am using gmail server is that I am unaware of my companies mail servers url&host name.
I have pinged gmail.com from my IBM i and it succeeds(I can access gmail from my company network). I added couple of properties by referring
http://www.mkyong.com/java/javamail-...-smtp-example/ to our service program but it still fails.
Could you please tell what I am doing wrong? and what is the difference between mail.smtp.host and mail.host
properties exactly??
Sorry to bother you,
-David
Comment