Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,460 members, 7,819,676 topics. Date: Monday, 06 May 2024 at 08:38 PM

Smtp With Images - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Smtp With Images (1039 Views)

MUST SEE! The 10 Top Richest Bloggers In The World (with Images) / Shop Admin [www.spamming-bank.ru] Selling : Smtp, Mailer, Rdp, Cpanel, Webmail / SMTP Server: How Do I Unblock A Blacklisted IP Address? (2) (3) (4)

(1) (Reply) (Go Down)

Smtp With Images by Easyphp: 4:58pm On Jun 21, 2010
Hello landers!!

PHP is what i use. have been using smtp to send mail and it works fine but now i want to add an image ( logo) as part of the msg
with my script when received, the email display the image code (<img src=', /img/logo.jpg' /> ) instead of the image

here is my smtp code


<?php
require_once "Mail.php";

$from = "Main product <name@mydomain.com>";
$to = "$surn <$email>";//variable for the receiver name and email
$subject = "Thank you: registration ok!";
$body = "<img src=', /img/jpy/nddclogo.jpg'/> \n\n Congratulation $surn Your registration for our product has just begun.\n\n To complete your registration click on link below,\n\n <a href='www.mydomain.com/regform1.php?mail=$email'>examingscholarships.com.md_rand(10000000,99999999).complete registration for product</a> \n\n Remember, Double Registration will automatically disqualified you, dont use your email for another registration.\n\n
MAIN PRODUCT\n\n
…. today opportunity for a better tomorrow.\n\n
\n\n
\n\n
\n\n
Regard\n\n
main product\n\n
enquiries@mydomain.com \n\n
www.mydomain.com\n\n


";

$host = "smtp.mydomain.com";
$username = "name@mydomain.com";
$password = "password";

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>"wink;
}
/*else {
echo("<p>Message successfully sent!</p>"wink;
}
*/
?>
Re: Smtp With Images by Nobody: 10:03pm On Jun 21, 2010
because as u send it the email sends it as a pure text, in the header specify content-type:text/html and it will treat it as an html page.consult your php manual,emails are quite sensitive to headers,
Re: Smtp With Images by Easyphp: 1:44pm On Jun 22, 2010
I just added the content-type and MIME VERSION just like below

$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject,
'MIME-Version' => 1.0,
'charset' => "iso-8859-1",
'Content-Type' => text/html);

yet is not showing the image
Re: Smtp With Images by Nobody: 9:46pm On Jun 23, 2010
how is the address of the image written relative or absolute it should be http://yourdomainname/path_to_image that should work
Re: Smtp With Images by Th0mas: 4:50pm On Nov 12, 2013
Welcome to www.rdpsh0p.com BIG UPDATE


ALL RDP ITS FRESH and ALL TOOLS FRESH


++++++++==========www.rdpsh0p.com=========++++++++++



We Have:




RDP UNITED STATES 2003-07-08
RPD EU
RDP WORL WIDE
DHL
MATCH ACC
OVERSTOCK
EBAY ACC
UPS
FEDEX ACC
SHELL
MAILER
WEBMAIL
C PANEL
SHELL
PAYPAL


++++++++==========www.rdpsh0p.com=========++++++++++






ETC ETC...... ALL FOR YOU HACKERS WELCOME
www.rdpsh0p.com
Re: Smtp With Images by honestseller34: 11:22am On Jan 03, 2014
Daily Professional Tools For Sale, 100% Trust !!!

Re: Smtp With Images by toolsshop65: 11:57pm On Jan 06, 2014
TRUSTED WORKING TOOLS FOR SALE!

RDP ADMIN+AMS
WEBMAIL
SMTP
CPANEL
USA LEADS
EUROPE LEADS
ASIA LEADS
AFRICA LEADS
PAYPAL ACCOUNTS VERIFIED
CREDIT CARD
C99 SHELL
PHP MAILER
SPYWARES [ATTACHMENT VIRUS FOR ALIBABA]
DATING LOGIN
SHOPPING
SPAMMING SERVICE

CONTACT ME FOR BUSINESS

toolsshop65@yahoo.com

(1) (Reply)

Кто какую музыку любит? / Gtbank.com Down! Santa Maria! / The Most Common Passwords Used Online

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.