This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,006 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

How to send Email with PHP and OIA

User_YQZCL
User_YQZCL Member Posts: 11 Green Ribbon

hi team,

we are trying to connect PHP with OPA. for sending a mail from opa.

Please help as ASAP.

Thanks

Rakesh

Best Answers

  • Richard Napier
    Richard Napier EuropeMember Posts: 546 Bronze Trophy
    edited Nov 4, 2022 3:35PM Answer ✓

    Hi Rakesh

    Just a friendly reminder - this is a peer to peer forum. It is not good practice to ask for a response "ASAP" - people come here to help, as and when they have time. You're not in a position to state deadlines.

    That said, here is the process

    1) Create a PHP file that (for example) accepts as input the email address of the person you want to send the email to. Deploy it to your server.

    2) Create an Interview Connection in the Oracle Intelligent Advisor referencing the PHP file.

    3) In the Interview, create an Interview extension to call interview.fetch() and call your Interview Connection, passing the data you need (the email address for example)

    4) In the promise, handle the response from PHPMailer.send() which is either 1 for success or anything else is a failure.

    This is what it would look like:


    have a great day!

    R

  • User_YQZCL
    User_YQZCL Member Posts: 11 Green Ribbon
    Answer ✓

    Hi Richard,

    Please accept my apologies for the state deadlines.

    I sincerely appreciate your flexibility and willingness to help. I wanted to express my personal gratitude for the effort and extra time you have contributed. Thank you for your help and support.

    Thanks

    Rakesh

Answers

  • Richard Napier
    Richard Napier EuropeMember Posts: 546 Bronze Trophy
    edited Nov 4, 2022 3:35PM Answer ✓

    Hi Rakesh

    Just a friendly reminder - this is a peer to peer forum. It is not good practice to ask for a response "ASAP" - people come here to help, as and when they have time. You're not in a position to state deadlines.

    That said, here is the process

    1) Create a PHP file that (for example) accepts as input the email address of the person you want to send the email to. Deploy it to your server.

    2) Create an Interview Connection in the Oracle Intelligent Advisor referencing the PHP file.

    3) In the Interview, create an Interview extension to call interview.fetch() and call your Interview Connection, passing the data you need (the email address for example)

    4) In the promise, handle the response from PHPMailer.send() which is either 1 for success or anything else is a failure.

    This is what it would look like:


    have a great day!

    R

  • User_YQZCL
    User_YQZCL Member Posts: 11 Green Ribbon
    Answer ✓

    Hi Richard,

    Please accept my apologies for the state deadlines.

    I sincerely appreciate your flexibility and willingness to help. I wanted to express my personal gratitude for the effort and extra time you have contributed. Thank you for your help and support.

    Thanks

    Rakesh