Gossamer Forum
Home : Products : DBMan : Installation :

Mailto problem

Quote Reply
Mailto problem
My database setup contains a field for Email address. The email address is highlighted (in the usual way) when one is present in the field, but when you click on it and the mail program opens, the email address does not appear in the 'To' field.
On checking the HTML you can see why...

<TD WIDTH="80%"> <Font face="Verdana, Arial, Helvetica" Size=2><a href="mailto:">test@test.com</a>

The address is not being inserted into the "mailto:" link. Anybody know what I'm doing wrong?



Quote Reply
Re: Mailto problem In reply to
You need to use the following codes in the sub html_record (and also turn off auto-generation for the codes to work)....

Code:

|;
if ($rec{'EmailFieldName'} neq "") {
print qq|<a href="mailto:$rec{'EmailFieldName'}">$rec{'EmailFieldName'}</a>|;
}
else {
print qq|No Email Provided|;
}


Edit the EmailFieldName to whatever your Email Field name is.

Regards,

Eliot Lee
Quote Reply
Re: Mailto problem In reply to
Are you using auto-generate?

If not, you may just have a typo in your html_record sub-routine.

The code should look similar to: <a href="mailto:$rec{'email'}">$rec{'email'}</a>

Make sure the $rec variable is in both places, and that the field name is spelled correctly. (remember - perl is case sensitive)

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Mailto problem In reply to
As I already stated...Wink

Regards,

Eliot Lee
Quote Reply
Re: Mailto problem In reply to
Cool

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/