[wp-hackers] wp_mail with string attachment

Lox lox.dev at knc.nc
Sun Oct 31 01:26:19 UTC 2010


When a hook doesn t allows enought arguments, you can use a global var.
(Ugly hack, I know)

Lox
Le 30 oct. 2010 20:31, "Olivier" <autremonde75 at gmail.com> a écrit :
> Thanks for your answer! I saw this action hook. The issue is that I
> don't see how to pass parameters to it. I could use this one to pass
> on my string attachment, this is probably the right place but how can
> I pass on my parameters (ie the string attachment content) through
> this action hook?
>
> Thanks!
>
> Olivier
>
> On Oct 30, 4:05 am, Michael D Adams <m... at blogwaffe.com> wrote:
>> On Fri, Oct 29, 2010 at 12:25 PM, Olivier <autremond... at gmail.com> wrote:
>> > Hello,
>>
>> > I'd like to use the wp_mail() function with string attachment feature
>> > of PHPMailer class. This would allow me to pass on directly the
>> > content I want to attach without having to go through a temp file
>> > creation which can result into problems if the directory isn't
>> > writable.
>>
>> > Is there a way to achieve this?
>>
>> I don't know anything about the attachment feature you want to use,
>> but the phpmailer_init hook called from wp_mail() gives you complete
>> access to the $phpmailer object.
>>
>> Mike
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hack... at lists.automattic.comhttp://
lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list