Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

email with attcahment in joomla

$from = 'admin@somewhere.com';
$fromname = 'BIGSHOT Blog';
$recipient[] = 'john@somewhere.com';
$recipient[] = 'jane@somewhere.com';
$subject = 'Want to learn about BIGSHOT Blog';
$body = '<p>Check us out!</p><p><a href="http://www.somewhere.com" target="_blank">http://www.somewhere.com</a></p>';
$mode = 1;
$cc = 'bob@somewhereelse.com';
$bcc[] = 'simon@somewhereelse.com';
$bcc[] = 'nick@somewhereelse.com';
$attachment[] = '/home/my_site/public_html/images/stories/food/coffee.jpg';
$attachment[] = '/home/my_site/public_html/images/stories/food/milk.jpg';
$replyto = 'no_reply@somewhere.com';
$replytoname = 'NO REPLY - BIGSHOT Blog';

JUtility::sendMail($from, $fromname, $recipient, $subject, $body, $mode, $cc, $bcc, $attachment, $replyto, $replytoname);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #email #attcahment #joomla
ADD COMMENT
Topic
Name
7+5 =