Hiya,
This is possible, but you’d need to hack the plugin directly at the moment.
You’d have to modify classes/em-object.php and add an extra parameter like so:
$EM_Mailer->send($subject,$body,$email, $attachment)
$attachment would be an array containing another array with your attachment info in this format (using our ical as example):
array(‘name’=>’invite.ics’, ‘type’=>’text/calendar’,’path’=>$icalfilename);
$icalfilename would be the server path to your file you’d like to attach.
Cheers,
Phil
Thread Starter
Saikes
(@saikes)
Thanks, i try that and tell you if it works.
Thread Starter
Saikes
(@saikes)
I have a question, is it possible to send more than one file with this array?
Thread Starter
Saikes
(@saikes)
I’m not quite sure with the server path, could you give me an example? There are no errors but no attachments either.
As $attachment is an array of attachments yes, you can send more than one.
You can use site_url() to get the URL to the root of your WordPress site, and work from there. Or use the ABSPATH constant.
Thanks
Thread Starter
Saikes
(@saikes)
Thanks for the answer, it works like a charm 😉