mailfrom hack in 1.3.4.

Questions and bug reports for current release of CKForms

mailfrom hack in 1.3.4.

Postby scalprum » Mon May 03, 2010 8:44 am

I've used this hack http://ckforms.cookex.eu/phpbb/viewtopic.php?f=5&t=231&hilit=%2Afrom%2A in version 1.3.3. to make the email in the form the mailfrom addres.

Is there a hack for version 1.3.4.?

Thanks!
scalprum
 
Posts: 2
Joined: Mon May 03, 2010 7:50 am
Top

Re: mailfrom hack in 1.3.4.

Postby scalprum » Tue May 04, 2010 4:39 pm

I found out that the same hack works.

After Line 468-469 that reads

Code: Select all
            $mailBody = $mailBody.JText::_( 'Article ID' ) . " : " . $articleid . "<br />\n";
         }


insert

Code: Select all
         // Rahul Chand - Start Hack
         function get_emails ($str)
            {
            $emails = array();
               preg_match_all('/(\w+\.)*\w+@(\w+\.)*\w+(\w+\-\w+)*\.\w+/', $str, $output);
               foreach($output[0] as $email) array_push ($emails, strtolower($email));
               if (count ($emails) >= 1) return $emails;
               else return false;
            }
           
            # Sample string containing email addresses;
               $str = $mailBody;

            # Get the emails on arrays;
               $emails = get_emails ($str);
         
            // Rahul Chand - End Hack


Edit Line 500 that reads

Code: Select all
         $mail->setSender( array( $ckform->emailfrom, "" ) );


to

Code: Select all
$mail->setSender($emails); // Rahul Chand - Call Email address from above hack
scalprum
 
Posts: 2
Joined: Mon May 03, 2010 7:50 am
Top

Re: mailfrom hack in 1.3.4.

Postby thelake » Thu Jun 10, 2010 9:21 am

very nice..;-)

now ckforms takes the system-mail as "adress-from" - That makes no sense

I need the adress from the form as "send-from"

Any suggestions?

Thanks for reply
thelake
 
Posts: 1
Joined: Thu Jun 10, 2010 9:15 am
Top

Re: mailfrom hack in 1.3.4.

Postby an241 » Mon Jun 21, 2010 11:28 am

How do your guy to copy with this problem? any advice?thanks
an241
 
Posts: 2
Joined: Mon Jun 21, 2010 11:19 am
Top


Return to CKForms 1.3.x Support forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron