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 = "name@yourdomain.com"; $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("whoto@otherdomain.com", "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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.