[mod] Personalized Subject Line version. 2.10.4

3rd party code for phpList

Would You Like To Have Personalized Subject Lines Become A PHPList Core Function?

Yes
45
100%
No
0
No votes
I Really Don't Care
0
No votes
 
Total votes : 45

Re: [mod] Personalized Subject Line version. 2.10.4

Postby osukaru » 4:38pm, Tue 17 Sep, 2013

for version 3.02

you can do this way *tested*

change line
Code: Select all
   if (!$mail->compatSend("", $destinationemail, $fromname, $fromemail, $subject)) {


to

Code: Select all
   $theSubject = plugAttributes($subject, $email);
    if (!$mail->compatSend("", $destinationemail, $fromname, $fromemail, $theSubject)) {



2
above the line

Code: Select all
function addAttachments($msgid,&$mail,$type) {


put

Code: Select all
function plugAttributes($str="", $email="")
{
   $custom_list=getUserAttributeValues($email);
   while (list($AttribName,$AttribValue) = each ($custom_list)) {
        foreach($custom_list AS $AttribName => $AttribValue)
                $str = trim(str_replace("[{$AttribName}]",$AttribValue,$str));
   }
   return $str;
}




but unfortunately its not working for [NAME%%friend] but it will work for [NAME]

hope it helps
osukaru
phpList newbie
 
Posts: 1
Joined: 4:32pm, Tue 17 Sep, 2013

Re: [mod] Personalized Subject Line version. 2.10.4

Postby leovalente » 2:21am, Mon 23 Sep, 2013

I simply cannot make it work. I'm still getting [EMAIL] in my subject, instead of the email address. Can you upload the modified file so I can try directly overwriting it?

Thank you in advance! Leo.
leovalente
phpList newbie
 
Posts: 1
Joined: 2:00am, Mon 23 Sep, 2013

Previous

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: No registered users and 1 guest

cron