Gossamer Forum
Home : Products : Links 2.0 : Customization :

*.info e-mail-adresses

Quote Reply
*.info e-mail-adresses
HI,

someone who added a link has a *.info-e-mail-adress. Links2 refused to send him mail, as It claimed *.infos does not exist.

Where do I patch the acceptable mail-domains?

I could not find anything when searching the CGis

Thanks
Quote Reply
Re: [fraktal] *.info e-mail-adresses In reply to
Look this over:

http://www.gossamer-threads.com/...i?post=164856#164856


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] *.info e-mail-adresses In reply to
Oooookey,

but I am no perl/regexp person. I have no idea what to change how. (I am interested in the topic of my link-collection, not soooo much in it's software ;) )

I expected that other people already had this problem and maybe already have a patch ;)

Help?

Thanks ;)
Quote Reply
Re: [fraktal] *.info e-mail-adresses In reply to
On order to get Links 'customized' to your preferences, you will need to be changing some code, and it's a good script to learn with. For what you need, look in the file db.pl, about three-quarters of the way down the file you'll see this:

# Before we display the HTML, let's fire off some validate/modify/delete emails
# lettings visitors know we've added their link. We only send the mail
# if $modify_list{$id} = 0 (if it's still 1, that means there was an error).
# NOTE: You can modify the text of the email in the email templates.
&html_print_headers; # Just in case sendmail coughs up an error.

if ($db_email_modify) {
ID: foreach $id (keys %modify_list) {
if ($modify_list{$id}) { next ID; }
elsif (${$links{$id}}{'Contact Email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ ||
${$links{$id}}{'Contact Email'} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) {
$errstr .= ($errstr, "<li>Email Error: <strong>$id</strong>. Record validated, but couldn't send auto email. Reason: Bad Email addres: '${$links{$id}}{'Contact Email'}'.");
}
else { &html_modify_email (%{$links{$id}}); }
}

Change that 3 to a 4. This allows four-letter tld's (.info).


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] *.info e-mail-adresses In reply to
Thanks, that was easy enough :=)