SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face help me on this form, please.

    PHP Code:
                                     <?php 
     
    $recipient 
    $mailto
    $headers ="From:$mailfrom";
    $subject "?";
    $message .= $msg;
    mail($recipient,$subject,$message,$headers);
    ?>

    It is a validation of a form. With this code I can received the email notification at the recipient email.

    But when I try to send an image....
    PHP Code:
                                 <?php 
     
    $recipient 
    $mailto
    $headers ="From:$mailfrom";
    $subject "?";
    $message .= '<html><head><title></title></head></head><body><img src="[url="http://www.domain.com/"]http://www.domain.com[/url]/04.jpg">\n';
    $message .= $msg;
    $message .= '</body></html>';
    mail($recipient,$subject,$message,$headers);
    ?>

    I don't received the email... It goes to the spam.

    Can anyone help me? Thank you.
    Last edited by magi; Aug 10, 2004 at 06:16.

  2. #2
    SitePoint Addict Mower's Avatar
    Join Date
    Feb 2004
    Location
    Aussie Aussie Aussie
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change your spam settings to allow the server address emails in...

    The better way of send email in php is to use phpMailer. It's a good class that will allow you to send html email with image imbedded in the email.

    http://phpmailer.sourceforge.net/


    "Will I ever find my way to GURU?"

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Quote Originally Posted by Mower
    change your spam settings to allow the server address emails in...

    The better way of send email in php is to use phpMailer. It's a good class that will allow you to send html email with image imbedded in the email.

    http://phpmailer.sourceforge.net/
    Hmmm... is that a program?

  4. #4
    SitePoint Zealot headsnet's Avatar
    Join Date
    Feb 2001
    Location
    London, UK
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpMailer is a PHP class that you can implement in your own PHP scripts to provide email sending functionality. It's pretty advanced with lots of features, including as Mower suggests embedding images inside HTML emails, and sending attachments etc.

    I've been using it for a while - as soon as I started using it I abandoned my own email sending routines and just use phpMailer now... It makes sending emails very very simple and easy.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •