PDA

View Full Version : E-mail script that thanks with person's name for subscribing?


Paulo
12-19-2002, 08:26 PM
Hi folks,

I hope you can give me some guidance on my problem.

I'm trying to set an e-mail script that can use the person's name when thanking him for subscribing to a newsletter.

I think it's something really basic we all should have when addressing someone to call him by his name. Don't you agree? And that applies to the Internet as well, I think.

Do you know some free script that can do that and where to get it?

I'd really appreciate your input on this.

As a foreigner, I'm sorry if my English is not that correctly worded.

Thanks in advance for your support.

Sincerely.
Paulo Pereira

Philip M
12-20-2002, 06:51 PM
Paulo -

First of all, your English is excellent. You can use the apostrophe correctly, and understand the difference between "it's" and "its" which is more than a good proportion of native English speakers do.

What you are requesting is a simple auto-responder, presumably in Perl. There are many such - see for example
www.hotscripts.com.

It is very simple to include a salutation "Dear CustomerName"
in the autoresponder, but be careful as some people may enter only their surname and "Dear Smith" then appears a bit abrupt.

Presumably you wish to code:-

print MAIL "Dear $CustomerName \n\n";

It's as easy as that!

Paulo
12-20-2002, 07:49 PM
Hi Philip,

Thanks a lot for your input and you support on my English skills.

6 year ago I almost didn't speak English. I'm self-
taught in English as in Spanish and so your comment means a lot to me. Anyway, in no way, I'm convinced I know everything and so I'll keep learning til I die.

Regarding your post to my question, as I'm programming ignorant, I don't know where goes that line of code.

I followed your advise and went to [url]www.hotscripts.com, however I couldn't find what I need or just don't know where to look for it. Actually I got a little lost and confused with all that jargon. I hope I'm not being too lazy.

You said Perl, right? I found an auto-responder that does that but has their name on it, obviously, and I don't want that as I want to have the name of my site on it.

Would you spend one more minute and let me know where and how to add it in my html and form script. Preferably the whole line of code, if it isn't asking too much. I'm sending you the code of my page as it might be needed:

"<html>
<head>
<title>Postales Que Venden - Newsletter</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.fecha { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: bold; color: #1E76A7; text-decoration: none; font-style: normal}
.texto1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: normal; color: #680068; text-decoration: none}
.copyright { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: normal; color: #000000; text-decoration: none}
.glosario { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color: #660066; line-height: 3px}
.quiensomos { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px}
.links { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: bold; color: #000000; text-decoration: underline}
a.links:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: bold; color: #990098; text-decoration: underline}
.textonegrita { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #7A007A; text-decoration: none}
.texto { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: normal; color: #7A007A; text-decoration: none}
.boldmurado { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold; color: #660066; text-decoration: none}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<body onLoad="window.resizeTo(380,515);">

<table width="351" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="28"><img src="images/newsletter/sup.gif" width="350" height="28"></td>
</tr>
<tr>
<td width="40"><img src="images/newsletter/latizq.gif" width="40" height="338"></td>
<td width="289" valign="top">
<form action="mailto:news@postalesquevenden.com" method="post" enctype="text/plain">
<table width="289" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="textonegrita">
<div align="center">&iexcl;Hola! Una pregunta: &quot;&iquest;Ya
se ha subscrito a nuestra Newsletter GRATUITA?&quot;. </div>
</td>
</tr>
<tr>
<td class="texto1" height="53">
<div align="center">Subscr&iacute;base a nuestra Newsletter gratuita
&quot;Promocionar es triunfar&quot; y descubra de los expertos<br>
lo que realmente funciona en lo que respecta<br>
a generar beneficios con la publicidad usando postales. </div>
</td>
</tr>
</table>
<table width="289" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="143">
<div align="right" class="boldmurado">Introduzca su nombre:</div>
</td>
<td width="142">
<input type="text" name="textfield" size="15">
</td>
</tr>
<tr>
<td colspan="2" class="texto1">( nombre y apellido ser&iacute;a mejor,
gracias)</td>
</tr>
<tr>
<td width="143">
<div align="right" class="boldmurado">Introduzca su e-mail:</div>
</td>
<td width="142">
<input type="text" name="textfield2" size="15">
</td>
</tr>
<tr>
<td colspan="2">
<div align="left">
<table width="285" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10">
<input type="radio" name="radiobutton" value="radiobutton">
</td>
<td width="275"> <span class="texto1"> Inf&oacute;rmenme de
otras ofertas de empresas con productos relacionados….</span></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" height="2" class="texto1">
<div align="center">
<table width="285" border="1" cellspacing="0" cellpadding="2" bordercolor="#990098">
<tr>
<td>
<div align="center"><span class="texto1"><b>Oferta especial</b></span><b><span class="texto1"></span></b><span class="texto1"><br>
Reciba de inmediato en su buz&oacute;n de e-mail el curso
gratis: &quot;&iquest;Por qu&eacute; promocionar con postales?&quot;.</span></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" height="35">
<div align="center">
<input type="submit" name="Submit" value="Env&iacute;enme la Newsletter">
</div>
</td>
</tr>
<tr>
<td colspan="2" height="33" class="texto1">
<div align="center">Pol&iacute;tica de privacidad: En absoluto vendemos,
alquilamos, prestamos, transferimos o revelamos su direcci&oacute;n
de e-mail a terceros. </div>
</td>
</tr>
</table>
</form>
</td>
<td width="22" valign="bottom"><img src="images/newsletter/latder.gif" width="21" height="338"></td>
</tr>
<tr>
<td colspan="3"><img src="images/newsletter/inf.gif" width="350" height="34"></td>
</tr>
</table>
</body>
</html>"


Thanks Philip... a lot.

Sincerely,
Paulo Sá Pereira

ACJavascript
12-20-2002, 08:07 PM
what you have in your html is mailing the form to your email address. You cannot send a autoresponse like that you need to use a CGI Script so as to use your sendmail.
Does your host support Perl ?

Paulo
12-20-2002, 10:00 PM
You're right, I've sent you another one where I haven't yet added the script.

I have the CGI script, I've tried before, and It works just fine except it doesn't acknolwledge the person with its name for having subscribed.

This is the CGI script I have installed:
<form action="http://www.postalesquevenden.com/cgi-sys/FormMail.cgi" method="POST">
<input type="hidden" name="recipient" value="ventas@postalesquevenden.com">
<input type="hidden" name="subject" value="encuesta">
<input type="hidden" name="redirect" value="http://www.postalesquevenden.com/gracias.htm">

Do you any script I can add to this one that uses that feature of using the subscriber name when acking him.

Thanks, ACJ.

Sincerely, Paulo

Philip M
12-21-2002, 08:05 AM
Paulo -

As I see it you are using Matt's Formmail.pl.

This does not include an auto-responder as it comes, but it
is not too difficult to modify to achieve that.

Yet you imply that you already have an auto-responder, the only problem you have it that you want it to address the person by name:-

Dear Mr Paulo,

Thank you for sending your order ............

Please clarify exactly what you have at present. If necessary I will look at your script as see what can be done.

Paulo
12-21-2002, 09:58 AM
Hi Philip,

I have the autoresponder that comes with my hosting. But I won't mind to change it if I can get another one that can use my sites name. The only thing is that I don't want to spend money on a autoresponder by now. In the future I want to buy autoresponseplus but for now I'm trying to set up the whole thing as I want without spending more money.

So, right now I don't know what else to tell you.

Just thanks. Paulo

ACJavascript
12-21-2002, 10:09 PM
Why don't you just post the cgi script here,, Either me or philip can easily add an autoresponder,, no problem. And add the clients name.

Paulo
12-21-2002, 10:35 PM
Cool!!!

The CGI script I have installed is this:

<form action="http://www.postalesquevenden.com/cgi-sys/FormMail.cgi" method="POST">
<input type="hidden" name="recipient" value="ventas@postalesquevenden.com">
<input type="hidden" name="subject" value="encuesta">
<input type="hidden" name="redirect" value="http://www.postalesquevenden.com/gracias.htm">

However as I'm not sure if that is all you need, I'm sending you the whole enchilada. The html of my pop-under where I want to install the autoresponder with that feature I mentioned earlier.

<html>
<head>
<title>Postales Que Venden - Newsletter</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.fecha { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: bold; color: #1E76A7; text-decoration: none; font-style: normal}
.texto1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: normal; color: #680068; text-decoration: none}
.copyright { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: normal; color: #000000; text-decoration: none}
.glosario { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; color: #660066; line-height: 3px}
.quiensomos { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px}
.links { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: bold; color: #000000; text-decoration: underline}
a.links:hover { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: bold; color: #990098; text-decoration: underline}
.textonegrita { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #7A007A; text-decoration: none}
.texto { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-style: normal; font-weight: normal; color: #7A007A; text-decoration: none}
.boldmurado { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold; color: #660066; text-decoration: none}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="window.resizeTo(380,520);" noresize;">

<table width="351" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="28"><img src="images/newsletter/sup.gif" width="350" height="28"></td>
</tr>
<tr>
<td width="40"><img src="images/newsletter/latizq.gif" width="40" height="338"></td>
<td width="289" valign="top">
<form action="http://www.postalesquevenden.com/cgi-sys/FormMail.cgi" method="POST">
<input type="hidden" name="recipient" value="news@postalesquevenden.com">
<input type="hidden" name="subject" value="encuesta">
<input type="hidden" name="redirect" value="http://www.postalesquevenden.com/newspopgracias.htm">
<table width="289" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="textonegrita">
<div align="center" class="textonegrita">&iexcl;Hola! Una pregunta:
&quot;&iquest;Ya se ha subscrito a nuestra Newsletter GRATUITA?&quot;.
</div>
</td>
</tr>
<tr>
<td class="texto1" height="53">
<div align="center">Subscr&iacute;base a nuestra Newsletter gratuita
&quot;Promocionar es triunfar&quot; y descubra de los expertos<br>
lo que realmente funciona en lo que respecta<br>
a generar beneficios con la publicidad usando postales. </div>
</td>
</tr>
</table>
<table width="289" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="143">
<div align="right" class="boldmurado">Introduzca su nombre:</div>
</td>
<td width="142">
<input type="text" name="textfield" size="15">
</td>
</tr>
<tr>
<td colspan="2" class="texto1">( nombre y apellido ser&iacute;a mejor,
gracias)</td>
</tr>
<tr>
<td width="143">
<div align="right" class="boldmurado">Introduzca su e-mail:</div>
</td>
<td width="142">
<input type="text" name="textfield2" size="15">
</td>
</tr>
<tr>
<td colspan="2">
<div align="left">
<table width="285" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10">
<input type="radio" name="radiobutton" value="radiobutton">
</td>
<td width="275"> <span class="texto1"> Inf&oacute;rmenme de
otras ofertas de empresas con productos relacionados….</span></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" height="2" class="texto1">
<div align="center">
<table width="285" border="1" cellspacing="0" cellpadding="2" bordercolor="#990098">
<tr>
<td>
<div align="center"><span class="texto1"><b>Oferta especial</b></span><b><span class="texto1"></span></b><span class="texto1"><br>
Reciba en su buz&oacute;n de e-mail el curso gratis: &quot;&iquest;Por
qu&eacute; promocionar con postales?&quot; en tres lecciones.</span></div>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" height="35">
<div align="center">
<input type="submit" name="Submit" value="Env&iacute;enme la Newsletter">
</div>
</td>
</tr>
<tr>
<td colspan="2" height="33" class="texto1">
<div align="center">Pol&iacute;tica de privacidad: En absoluto vendemos,
alquilamos, prestamos, transferimos o revelamos su direcci&oacute;n
de e-mail a terceros. </div>
</td>
</tr>
</table>
</form>
</td>
<td width="22" valign="bottom"><img src="images/newsletter/latder.gif" width="21" height="338"></td>
</tr>
<tr>
<td colspan="3"><img src="images/newsletter/inf.gif" width="350" height="34"></td>
</tr>
</table>
</body>
</html>

Thanks a lot guys,
Paulo

ACJavascript
12-21-2002, 10:40 PM
I ment the actual cgi script :D,,

the script that is getting and sending the emails. ect...

Oh and what is the clients textbox name?
like : <input type="text" name=" ? " > what is the name of the textbox that the client will be putting his/her name in?

Paulo
12-22-2002, 06:58 AM
Yeah, I knew it. I was not sure on your question, that I sent you the html.

Now, I don't know how to get it because I've been using my web hosting autoresponder and so on. That's what I use.

I actually went there to try to find it and there's not even a name for the autoresponder. I believe this is the same product used by most hostings. You go to a CPanel 5.

That's all I can tell you right now.

I might be able to get it asking the hosting but I'm not sure they'll know.

Thanks a lot, man. Paulo

Philip M
12-22-2002, 08:59 AM
This cannot be done unless you have access to the cgi script.

But your form action is:-

<form action="http://www.postalesquevenden.com/cgi-sys/FormMail.cgi" method="POST">

so I am not too clear why you do not have access to this script.

Exactly what is sent out by your system autoresponder which you say you have already installed and working? It is a plain impersonal acknowledgement (the same for everyone) or is it "personalised" with details of the customer's order?

Another angle is to include the customer name on the thank-you (gracias) page, thus:-

"Thank you for sending your order, PAULO"

This can easily be done with a session cookie.


If I have got it right, the customer name (nombre) is entered at:-

<div align="right" class="boldmurado">Introduzca su nombre:</div>
</td>
<td width="142">
<input type="text" name="textfield" size="15">

So the name is stored in "textfield" (not the most transparent coding - what was wrong with "hombrenombre"?)

Philip M
12-22-2002, 09:31 AM
I logged on to your site and subscribed to your newsletter.
I received TWO acknowledgements:-

Hola:

Queremos felicitarte por tu inteligente decisión de suscribirte a la Newsletter "Promocionar es triunfar" que te trae con orgullo PostalesQueVenden.com

Is what we are trying to achieve is to get it to say

Hola PHILIP M?

But I now see that the form submitted from Microsoft Internet Explorer was:-

textfield2=Philip M
textfield=junk@mydoamin.co.uk
Submit=Enviar

which seems to reverse "textfield2" and "textfield".


Feliz navidad! Vrolijke Kerstfeest!

Paulo
12-23-2002, 12:55 PM
Hi Philip,

Thanks for your wishes and Merry Christmas & a Happy New Year for you.

Probably you won't be checking this site for the hollydays but in case you do, I'm going to answer you.

Yes, on my answer to the subscription, I would like to answer it with the persons first name. (No, Mr: here.)

On the second ack (the Internet Explorr form), I don't understand why you are receiving it. I should receive a forwarding of the persons subscription, with its name and e-mail, but not you. Is that e-mail addressed to you? Do you have an idea why it's that happening?

On the text fields I'm going to correct that.

Well, thanks Philip, once again, your input is being very helpful to me.

In order to understand what's going on, I've sent a survey to some friends but they'te are not experts on this. So thanks a lot and Merry Christmas & a Very Prosperous & Happy New Year.

Sincerely, Paulo

ACJavascript
12-23-2002, 04:26 PM
mmm. those seem like simple errors from the cgi script. Simple mix ups. if ya can post the cgi script im sure me or philip can fix it. You should find it in your cgi-bin, or it seems like you have it in cgi-sys.

Paulo
12-23-2002, 06:28 PM
Hi AC,

Thanks for answering.

I went to my CPanel to see if I was able to find any info on that, but I couldn't.

I'll try to find the info and I'll post in a couple of days since I'll be out for the Hollydays. Thanks again.

Happy Hollydays!

Paulo

Philip M
12-23-2002, 06:35 PM
ACJavascript and I are both keen to help you, but the problems lie in your cgi script.

Please download:-

postalesquevenden.com/cgi-sys/FormMail.cgi

and then post it here so we can look at it, or send it by email.

I guess your Cpanel is the Control Panel which probably shields inexperienced users from the host system, but may prevent you from downloading the cgi scripts.

Or is the position that you do NOT have any access to cgi-bin, and the FormMail.cgi is supplied by your host ISP, a general purpose script which is available to all users (a server-side include in effect), which sends the mail to "recipient" as defined in the HTML page, and generates a standard non-editable acknowledgement? If that is the case nothing can be done (except upgrade to your own cgi-bin).

Happy Christmas to all!

Paulo
01-02-2003, 05:00 PM
Hi Philip & AC?

How was the hollidays? I hope you had a terrific time.

Now, I followed what you told me and asked my host and his answer is the following:

: Hello Paulo,
Hope you'll have a great year too!

To answer your questions.
What you're requesting is adding on features for your own website. We only provide support on issues that are related to our hosting/server issues like cgi-bin doesn't work correctly, or FrontPage extension is not enable, install additional perl modules that your scripts need...or something like that. But for features/programming for client website, you must do it yourself or out source somewhere. We can only help you trouble shooting, but not setting up for you.

However, what you want to do is quite simple. Just go to hotscripts.com, and search for 'mailing list' or 'list manager', you'll be able to find free pre-written scripts that do exactly what you want and you can install yourself on your account.

Best regards,

Now, I went to hotscripts and I was confronted with lots of options. Before I get into try this and that I thought it would be wise to ask you guys what you recommend: Which one you advise me on using.

Thanks guys,

Once again, have a fantastic year.
Paulo

Paulo
01-02-2003, 06:29 PM
Hi Guys,

I found this script and I was wodering if you could give me your opinion on it before go through the ordeal of installing it. I checked with my host and they said it works on their servers.

I'm sending installation info so you have all the info needed.

Follow Up Mailing List Processor Version 4.0 Lite
http://www.sellwide.com

I'm sending their installation info so you can tell.

INSTALLATION

Please read this document completely before proceeding with installation.



1.==========
Upload all the files contained in this archive (retaining the directory
structure) to the /cgi-bin/ directory on your server or hosting account.

Tip: I suggest you to create a new subdirectory in your /cgi-bin/
For example /cgi-bin/maillist/

All files should be uploaded in ASCII mode. If you are unfamiliar with
what this means please refer to your FTP client documentation. In most
cases this is all handled transparantly by your ftp client but if you
encounter problems later you should be sure the files where uploaded
correctly as described here.



2.==========
Using your FTP client set the permissions of the following files
to CHMOD '755'

conf.cgi
func.cgi
install.cgi
register.cgi
responder.cgi
broadcaster
starter.cgi

All other files will have permission CHMOD '644'



3.==========
Once all the files have been uploaded and permissions set you should
point your browser to the install.cgi file. For example if your domain
name is www.mydomain.com and you placed Follow Up Mailing List Processor
in a directory http://www.mydomain.com/cgi-bin/maillist/ you would
enter http://www.mydomain.com/cgi-bin/maillist/install.cgi into your
browser. When you have done this you should see the Installation screen
appear.

Before proceeding with installation you should ensure you have a database
available. Most good hosting accounts now come with at least one database
as part of the basic package although it may need to be setup before first
use. Ask your provider for details if you are unsure whether you do or not.

Once you have reached the installation page you need to fill out several
fields. There are 3 steps.

--Step 1: To start installation please enter your registration key (license code).
It will be in the email you received during registration at our site.

--Step 2: Database connection
If you do not have or do not know the database server, database name,
database username, database password, please check with your hosting provider.
The database server is typically localhost but this is not universal! The
database prefix allows you to enter a few characters, short name, etc.
which all tables used by this installation will be prefixed with.
The default (swd_) will usually be fine. However if you have more than one
copy of Follow Up Mailing List Processor using the same database be sure to
alter it or you will receive errors during installation.

--Step 3: Password to access to administration page. You will need to choose
a password for the initial administration account. You will be able to change
it later.

The installation script will create and populate all the necessary tables.



4.==========
Now you MUST set up the activation link.

You place a 1-pixel "image" on a well viewed web page, which activates
the script periodically. If there even one visitor a day it will work fine.

When activated, it checks the POP3 email accounts you specified and sees
if it needs to send a confirmation e-mail to your contacts and adds them
to your mailing list.

The syntax of the activation "image" follows:

<img src="http://www.mydomain.com/cgi-bin/maillist/starter.cgi" border="0">

You can even place the activation image on another domain. It will activate
the script everytime somebody visits that page. However, in my experience,
I suggest that you place it on the entry page to your site.



5.==========
Now login to the admin area using the password you specified during
installation. To run the admin area, just point your browser
to the responder.cgi file

Like this: http://www.mydomain.com/cgi-bin/maillist/responder.cgi

After you logged in please go to "GLOBAL SETTINGS" and enter all required
information.

Personal: Here you can set your admin email and admin name.

SMTP/sendmail: Here you should specify your server's mailing program

Access: Here you can change your password

Time Synchronization: Change time depending on your time zone


Once you have completed the installation, you need to delete out install.cgi
from your server. Leaving it in place is a very serious potential security issue.

Thanks a lot!

Paulo