Gossamer Forum
Home : Products : Links 2.0 : Customization :

How can I send a auto-reply when a user submits a url?

Quote Reply
How can I send a auto-reply when a user submits a url?
When a user submits there site, is there a way that I can atuo-maticly send a e-mail to them?

------------------
Thank You,
James Hardy
HipHopBot Co.
support@hiphopbot.com
http://hiphopbot.com
Quote Reply
Re: How can I send a auto-reply when a user submits a url? In reply to
This is already done when the link is validated. So, you want to be able to send them three emails:

1) Upon Submission
2) When the Link is Validated
3) When the Link is Modified

Right?

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: How can I send a auto-reply when a user submits a url? In reply to
Hello, AnthroRules

Hello, yes. Thanks for the help.


------------------
Thank You,
James Hardy
HipHopBot Co.
support@hiphopbot.com
http://hiphopbot.com
Quote Reply
Re: How can I send a auto-reply when a user submits a url? In reply to
Okay...this has been discussed before in this forum...

Anyway...

1) Add the following variable and configuration in your links.cfg file:

Code:
$db_confirm_email = 1;

2) Then add the following codes in the sub process_form routine in the add.cgi file:

Code:
# Send Confirmation Email Message to
# Link Owners
if ($db_confirm_email) {
&send_confirm;
}

AFTER the following codes:

Code:
# Send the admin an email message notifying of new addition.
&send_email;

3) Then add the following sub-routine in the add.cgi file:

Code:
sub send_confirm {
# --------------------------------------------------------
# Sends an email message to LINKS Owners.
# Check to make sure that there is an admin email address defined.
$db_admin_email or &cgierr("Admin Email Address Not Defined in config file!");

my $to = $in{$db_cols[$db_contact_email]};
my $from = $db_admin_email;
my $subject = "Addition to Database: $in{'Title'}\n";
my $msg = qq|
You have added the following link at $build_site_title....

Link ID: $in{'ID'}
Title: $in{'Title'}
URL: $in{'URL'}
Category: $in{'Category'}
Description: $in{'Description'}
Contact Name: $in{'Contact Name'}
Contact Email: $in{'Contact Email'}

Remote Host: $ENV{'REMOTE_HOST'}
Referer: $ENV{'HTTP_REFERER'}

Your site will be validated soon. When we add your site, we will notify you via email.

Sincerely,

$build_site_title
$build_root_url
$db_admin_email

|;

# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;
}

That should do it.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: How can I send a auto-reply when a user submits a url? In reply to
Hello Lee,
Is it possible to mail each and every link owners in a particular category if a new link is added in that particular category?
Well, though i m not good at programming but i think we can do it through the following way.....
We have a .txt file for each and every category containing email address of all link owners in particular category. When a new link is added into that particular category, an email containg information about the new link should be send to all the link owners in that particular categories.
After mailing the present link owners, the script should add the new link owner into this list.
We can also have the option whether to get informed about new links in the particular category to the user while he adds his link.

Please help me with this.

Best Regards
San