That works great! BTW I accidentally omitted the "&&" on the first line and
it still worked.  Now we have enough to start taking pre-registrations on
the web.  Even if they do use an existing profile, at least you have the
domain, order #, # of tickets (for.biz), and CC info.  The rest you should
be able to get from the admin interface.  John and Robert, thanks for
sharing your input on this bad boy!  Heres what I ended up with that works
with new profiles:

    # email kludge ###############

            ############################################################
            # sample routine to send message to admin with billing info

            my $ticket = $in{ticket};
            my $id = $register_results->{attributes}->{id};
            my  $reg_type = "New BIZ Domain";
            if (($REG_SYSTEM{F_SEND_ORDERS})) {
                # sample routine to send message to customer
                # THINK: Email & RACE...
                send_email("$path_templates/message.txt",
                          {
                           %in,
                           domain =>  $in{domain},
                           ticket =>  $ticket,
                           mailfrom => $in{owner_email},
                           mailto => $ADMIN_EMAIL,
                           id => $id,
                           period_text => $REG_PERIODS{$in{period}},
                           reg_type => $reg_type,
                           billing_first_name => $in{owner_first_name},
                           billing_last_name => $in{owner_last_name},
                           billing_org_name => $in{owner_org_name},
                           billing_address1 => $in{owner_address1},
                           billing_address2 => $in{owner_address2},
                           billing_city => $in{owner_city},
                           billing_state => $in{owner_state},
                           billing_country => $in{owner_country},
                           billing_postal_code => $in{owner_postal_code},
                           billing_phone => $in{owner_phone},
                           billing_fax => $in{owner_fax},
                           billing_email => $in{owner_email},

                           });
            }

            # sample routine to send message to customer
            # THINK: Email & RACE...
            if ($REG_SYSTEM{F_SEND_THANKYOU}) {
                send_email("$path_templates/thankyou.txt",
                          {
                           %in,
                           domain =>  $in{domain},
                           mailto => $in{owner_email},
                           mailfrom => $ADMIN_EMAIL,
                           id => $id,
                          });
            }

            ################################################################

Also for the .biz message.txt add this line for # of tickets

# of Tickets:    {{ticket}}

Remeber, if they use an existing profile, as mentioned by John, you wont get
any of the contact info for owner or billing.  What you will get is domain
name, order #, order ID, and CC info.

Hope that helps!

-Philip

----- Original Message -----
From: "John Keegan" <[EMAIL PROTECTED]>
To: "Philip Clever" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 4:25 AM
Subject: Re: can you share with me what you did? re 2.41 of opensrs


> If you want to pass in the Billing info to an email message, my hack to do
> so is below. However, if the registration is based on an existing profile,
> none of this will work. The only things sent in a pre-reg based on an
> existing profile are the new domain, the old domain, and (I think) the
> password and username. In order to make any of this work for an existing
> profile, you will need to send $xcp_request to the server to get the
domain
> name info, then do something with it. I won't have any time to look into
> this today, but if anyone gets anywhere with that I would love to take a
> look at your code.
>
> In any case, this appears to work for a new pre-reg:
>
> if (($in{flag_billing_use_admin}) && ($REG_SYSTEM{F_SEND_ORDERS})) {
>     send_email("$path_templates/message.txt",
>       {
>         %in,
>         domain =>  $in{domain},
>         mailfrom => $in{owner_email},
>         mailto => $ADMIN_EMAIL,
>         id => $id,
>         period_text => $REG_PERIODS{$in{period}},
>         reg_type => $reg_type,
>         billing_first_name => $in{owner_first_name},
>         billing_last_name => $in{owner_last_name},
>         billing_org_name => $in{owner_org_name},
>         billing_address1 => $in{owner_address1},
>         billing_address2 => $in{owner_address2},
>         billing_city => $in{owner_city},
>         billing_state => $in{owner_state},
>         billing_country => $in{owner_country},
>         billing_postal_code => $in{owner_postal_code},
>         billing_phone => $in{owner_phone},
>         billing_fax => $in{owner_fax},
>         billing_email => $in{owner_email},
>        });
> } elsif ($REG_SYSTEM{F_SEND_ORDERS}) {
>     send_email("$path_templates/message.txt",
>     {
>         %in,
>         domain =>  $in{domain},
>         mailfrom => $in{owner_email},
>         mailto => $ADMIN_EMAIL,
>         id => $id,
>         period_text => $REG_PERIODS{$in{period}},
>         reg_type => $reg_type,
>        });
>     }
>
> Good luck out there.
>
> --
> John Keegan
> [EMAIL PROTECTED]
> http://RackShare.com
>
>
> > From: "Philip Clever" <[EMAIL PROTECTED]>
> > Date: Tue, 24 Jul 2001 17:46:46 -1000
> > To: "Mark Engelhardt" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Subject: Re: can you share with me what you did?  re 2.41 of opensrs
> >
> > I got an email from Robert and he said that if the Billing info is the
same
> > as the admin (owner) info then it won't pass the billing info to
mesage.txt
> > .  I haven't heard back from him if he ever got owner info passed
though....
>
>

Reply via email to