Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Email question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Email question

    I'm having trouble with the email portion of the example code. My assumption is that I should specify the user, password and mail host as parameters to program AIR13_01, so I'm calling the program like:

    CALL PGM(AIR13_01) PARM('user' 'pass' 'mail.myisp.com')

    with the parms filled in with info for my ISP's mail server. But when I run the program I get the following errors:

    javax.mail.MessagingException: Unknown SMTP host: sm
    TransportSend Error

    I'm assuming that the "sm" is possibly the first two characters of "smtp.example.com" that is coded in SvAirEmail, but I'm not really sure. Do I need to change something in the code?

  • #2
    Email Answer

    Air13_01 currently does not accept the parameters, the values are currently coded into the example.

    You can either modify the code to accept the parameters and pass them into the AirEmail_newMessage procedure or you will need to modify the current values:

    msg = AirEmail_newMessage('TomSnyder':'mcpr3$$');

    to pass your email account settings: user name and password when creating the message to match your

    msg = AirEmail_newMessage('user':'pass');

    For the host, you can:



    Change the default svDefaultHost in AirEmail_newMessage:

    D svDefaultHost C CONST('mail.myisp.com')

    OR you can pass it in the optional parameter when creating the message:

    msg = AirEmail_newMessage('user':'pass': 'mail.myisp.com');

    Sounds like you almost have everything working!

    Have Fun!
    Tom

    Comment


    • #3
      Perfect. Email went through without a hiccup!

      Comment

      Working...
      X