Link to home
Start Free TrialLog in
Avatar of Scott Johnston
Scott JohnstonFlag for United States of America

asked on

When sending a email in PHP program, How do I insert a image?

This is a sample of the coding:
-----------------------------------------------------------------------------------------------------------
$message = "";
                if(isset($_SESSION["NewAccountCreated"])) {
                    $message = "Hello ".$order->Billing->Name.",\n".
                        "Thank you for ordering and registering an account at www.ZZZZZZZ.com. ".
                        "We have received your order. Should you need to make changes to your order, ".
                        "please call us at XXX.YYY.6457, during our normal business hours (see below). ".
                        "We are glad to help you. Please remember, orders placed by 12 noon, pacific time, ".
                        "ship the same business day. Below is your order confirmation number, please ".
                        "keep a copy of it should you need to reference your order.\n\n".
                        "Order Confirmation #: ".$salesOrderNumber."\n\n".
                        "Account #: ".$account->CustomerNumber."\n\n".
                        "Thank you!\n-The ZZZZZZZ Team";
                } //end if
                else if(isset($_SESSION["LoginEmail"])) {
                    $message = "Order Confirmation.\n\n".
                        "Thank you for your recent order with ZZZZZZZ. ".
                        "Whats Next? Once your order ships an Invoice and tracking number".
                        "             will be emailed to you.".
                        "We have received your order. Should you need to make changes to your ".
                        "order, please call us at XXX.YYY.6457, during our normal business hours ".
                        "(see below). We are glad to help you. Please remember, orders placed by ".
                        "12 noon, pacific time, ship the same business day. Below is your order ".
                        "confirmation number; please keep it handy should you need to reference your order.\n\n".
                        "\t\t\t Order Confirmation #: ".$salesOrderNumber."\n\n".
                        "\t\t\t Account #: ".$account->CustomerNumber."\n\n".
                        "\t\t\t Customer Name - ".$order->Billing->Name.".\n\n".
                        "Thank you!\n- The ZZZZZZZZ Team";
                } //end else
------------------------------------------------------------------------------------------------------------------
Here is the result:

Order Confirmation.

Thank you for your recent order with ZZZZZZZ. Whats Next? Once your order ships an Invoice and tracking number             will be emailed to you.We have received your order. Should you need to make changes to your order, please call us at XXX.YYY.6457, during our normal business hours (see below). We are glad to help you. Please remember, orders placed by 12 noon, pacific time, ship the same business day. Below is your order confirmation number; please keep it handy should you need to reference your order.

                   Order Confirmation #: I149705

                   Account #: 0000007

Customer Name - TEST - TEST - IT - TEST.

Thank you!
- The ZZZZZZZZ Team

----------------------------------------------------------------------------------------------------
I like to have our Company logo in the Email and a product image?

Can I do something like that?
Avatar of Rob
Rob
Flag of Australia image

Yes but you can't include them in the email.  you're better off referencing those images from your website and show them in your email using html img tags
e.g.
<img src='domain.com/path/to/images/logo.jpg>
<img src='domain.com/path/to/products/xyz/xyz.jpg>
SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Scott Johnston

ASKER

Rob, thank you for the guide line on this.  It was very helpfull.!!!