[phorm] [Phorm:] Re: Possible to set CC or BCC field?

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 21 May 2004 01:51:34 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#4062) Re: Possible to set CC or BCC field? 
            <http://www.phorm.com/support/?rev=4062> 
  AUTHOR:   Bob Brody 
  DATE:     May 20, 2004 at 9:51 p.m. EST 

  Reply To: (#4061) Possible to set CC or BCC field? 
  Author:   carlos 
  Date:     May 20, 2004 at 6:56 p.m. EST 

Hi, 

When you say you've tried the example in the docs and nothing works, does that 
mean no email is sent and received by both recipients? Your code looks okay to 
me. What happens when you try to send to just one person? Does that work? 

I haven't done this with the newest version, but I've done it with the v2.xx 
versions and I think it should still work. If you want to send the same info 
to two addresses, in addition to what the docs say, you can just list more 
than one address separated by a comma: 

$PHORM_TO = "first@xxxxxxxx, second@xxxxxxxx"; 

The two recipients will receive the email and both addresses will be displayed 
in the To: field. If you wanted instead to hide one of the addresses with Bcc, 
you could do this: 

$PHORM_TO = "first@xxxxxxxx"; 
$PHORM_HEADERS = "Bcc:second@xxxxxxxx\n"; 

That would also work if you wanted it to be Cc instead of Bcc. (Be careful 
with the uppercase/lowercase spelling because I think some mail programs will 
not recognize the header if it is all uppercase. It should be, for example, 
Bcc not BCC and Cc not CC.) 

In the more current versions of Phorm, there is additional flexibility for 
creating headers in the mail template itself instead of in the config file. I 
haven't played around with that as yet. 

The above is referring to sending the "same" data to both recipients. If you 
wanted to send different data to different recipients, you would use the array 
procedure and point to a different template file for each recipient. 

$PHORM_TO[1] = "first@xxxxxxxx "; 
$PHORM_TMPL[1] = "email1.txt"; 

$PHORM_TO[2] = "second@xxxxxxxx "; 
$PHORM_TMPL[2] = "different-email.txt"; 

That's a completely cool feature of Phorm which I use a lot. 

If one person is getting the mail okay, just try adding the second address as 
mentioned above and see if that works for you. 

$PHORM_TO = "first@xxxxxxxx, second@xxxxxxxx"; 

Bob 

> Hi, 

> I am trying to send the info entered in a form to two 
> emails. These are two people that get a notice 
> whenever someone subscribes to attend a course, I 
> tried this, as explained in teh FAQ: 

> $PHORM_TO[1] = "first@xxxxxxxx "; 
> $PHORM_TMPL[1] = "email1.txt"; 

> $PHORM_TO[2] = "second@xxxxxxxx "; 
> $PHORM_TMPL[2] = "email1.txt"; 

> (in both the email is actually the same) I tried all 
> variations, including making an array only of the 
> phorm_to (only one tmpl) but nothing works, I read 
> this forum many times, but still nothing. So my idea 
> is that maybe there is something that just doesnt work 
> on this server/php version (its a raq server, I dont 
> know the php version). does this make sense? otherwise 
> I dont know whats wrong (I added my config file below) 
> because when I send to only one mail this works 
> perfectly... 

> Since I know both maisl, if I could set a CC form or 
> BCC that would be all I need, both people receive the 
> same email... 

> Thanks 
> my config (.phm file). This doesnt work 

> <?php 
> $PHORM_ALERTTO = "carlos@xxxxxxxx "; 

> $PHORM_TO[1] = "first@xxxxxxxx "; 
> $PHORM_TMPL[1] = "email1.txt"; 

> $PHORM_TO[2] = "second@xxxxxxxx "; 
> $PHORM_TMPL[2] = "email1.txt"; 

> $PHORM_SUBJECT = "inscripcion a jornadas 
> ingles"; 
> $PHORM_TMPL = "email1.txt"; 

> $PHORM_ACK = "gracias1.html"; 

> $PHORM_REQ = "PHORM_FROM"; 

> $PHORM_FROM = ph_DECLARE; 

> ?> 

> this works ok: 

> <?php 
> $PHORM_ALERTTO = "carlos@xxxxxxxx "; 

> $PHORM_TO = "first@xxxxxxxx "; 

> $PHORM_SUBJECT = "inscripcion a jornadas 
> ingles"; 
> $PHORM_TMPL = "email1.txt"; 

> $PHORM_ACK = "gracias1.html"; 

> $PHORM_REQ = "PHORM_FROM"; 

> $PHORM_FROM = ph_DECLARE; 

> ?> 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: