darphas Posted May 6, 2013 Share Posted May 6, 2013 Hi, i have a catalog that display 6 pictures in every item.. sometimes i need to send a specific photho from the item very quickly.. but i cant i tried everthing.. the process that i do is download the image and send it in outlook.. and thats very very low process! i try this code. Config mysql_query( "SELECT photo_caption,photo_description,photo_code,photo_filename,photo_filename2,photo_filename3,photo_filename4,photo_filename5,photo_filename6,photos FROM gallery_photos WHERE photo_id='".addslashes($pid)."'" ); list($photo_caption,$photo_description,$photo_code,$photo_filename,$photo_filename2,$photo_filename3,$photo_filename4,$photo_filename5,$photo_filename6,$photos) = mysql_fetch_array( $result ); <?php include_once('./phpMailer_v2.3/class.phpmailer.php'); $mail = new PHPMailer(); // defaults to using php "mail()" $body = "<body><img src='".$images_dir."/".$photo_filename."'></body>"; $mail->From = "[email protected]"; $mail->FromName = "First Last"; $mail->Subject = "Test Subject via mail()"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress("[email protected]", "John Philips"); //$mail->AddAttachment("images/phpmailer.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } ?> i;m newbie in php i try some crazy things only if works but no all the time.. Link to comment https://forums.phpfreaks.com/topic/277709-email-photos-from-website/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.