BigCommerce - Hosted Ecommerce Software by Interspire

Interspire Forum

 
Go Back   Interspire Forum > Interspire Email Marketer Community Forum > Customization and Integration

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2007, 09:50 AM
telmobrito telmobrito is offline
Junior Member
 
Join Date: Jan 2007
Posts: 11
Default Global Variable

Hi,

I would like to know what is the global variable that contains the from email address. I'm kind of new to php and cant find this variable. I want do do and if statement in the email.php file but need to know where i can get the from email address.

Thank-you,

Telmo Brito
Reply With Quote
  #2  
Old 05-08-2007, 12:48 AM
Chris S Chris S is offline
Senior Member
 
Join Date: Feb 2004
Posts: 4,642
Default

Hi,

There is no global variable for this. It comes from the database based on what options you choose when you send.

What are you trying to do ?

Quote:
Originally Posted by telmobrito
Hi,

I would like to know what is the global variable that contains the from email address. I'm kind of new to php and cant find this variable. I want do do and if statement in the email.php file but need to know where i can get the from email address.

Thank-you,

Telmo Brito
Reply With Quote
  #3  
Old 05-08-2007, 10:29 AM
telmobrito telmobrito is offline
Junior Member
 
Join Date: Jan 2007
Posts: 11
Default

Hi Chris,

What I'm trying to do is see who is the sender of the mail so that is the sender corresponds to a certain email address it will append a digital signature to the outgoing mail. Because I have more than one email address that needs to digitally sign the email, I need to know who the sender is.

Code sample:

if ($ReplyTo == 'xyz@xyz.com') {
$fp = fopen("C:\Certificates\msgnewsletter.txt","w");
fwrite($fp,"Content-Type: text/html;charset=\"iso-8859-1\"Content-Transfer-Encoding: quoted-printable" . $body);
fclose($fp);
openssl_pkcs7_sign("C:\Certificates\msgnewsletter.txt", "C:\Certificates\signedmsgnewsletter.eml", "file://C:\Certificates\newslettercert.pem",array("file://C:\Certificates\newsletterprivkey.pem","xxxxxx"),array("To" => "$to","From" => "$ReplyTo", "Subject" => "$subject"),PKCS7_DETACHED);
$file = join ("", $file_arry);
$message = preg_replace("/\r\n|\r|\n/", "\r\n", $file);

$fp = fopen("C:\Inetpub\mailroot\Pickup\signedmsgnewsletter.eml", "wb");
flock($fp, 2);
fputs($fp, $message);
flock($fp, 3);
fclose($fp);
}

Thanks,
Telmo Brito
Reply With Quote
  #4  
Old 05-10-2007, 01:24 AM
Chris S Chris S is offline
Senior Member
 
Join Date: Feb 2004
Posts: 4,642
Default

Hi Telmo,

If you're running NX 1.0.6 edit the admin/functions/api/ss_email.php file.

I guess you'll need to sign this per recipient so you'll have to do it inside:

PHP Code:
foreach ($this->_Recipients as $p => $details) { 
(around line 917).

Since it's inside a class, you can do:

PHP Code:
if ($this->ReplyTo == 'email@address.com') {
.....

See the admin/functions/api/email.php file for the variable names (all of the 'var $' bits at the top).

Quote:
Originally Posted by telmobrito
Hi Chris,

What I'm trying to do is see who is the sender of the mail so that is the sender corresponds to a certain email address it will append a digital signature to the outgoing mail. Because I have more than one email address that needs to digitally sign the email, I need to know who the sender is.

Code sample:

if ($ReplyTo == 'xyz@xyz.com') {
$fp = fopen("C:\Certificates\msgnewsletter.txt","w");
fwrite($fp,"Content-Type: text/html;charset=\"iso-8859-1\"Content-Transfer-Encoding: quoted-printable" . $body);
fclose($fp);
openssl_pkcs7_sign("C:\Certificates\msgnewsletter.txt", "C:\Certificates\signedmsgnewsletter.eml", "file://C:\Certificates\newslettercert.pem",array("file://C:\Certificates\newsletterprivkey.pem","xxxxxx"),array("To" => "$to","From" => "$ReplyTo", "Subject" => "$subject"),PKCS7_DETACHED);
$file = join ("", $file_arry);
$message = preg_replace("/\r\n|\r|\n/", "\r\n", $file);

$fp = fopen("C:\Inetpub\mailroot\Pickup\signedmsgnewsletter.eml", "wb");
flock($fp, 2);
fputs($fp, $message);
flock($fp, 3);
fclose($fp);
}

Thanks,
Telmo Brito
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump