Gossamer Forum
Home : Products : DBMan : Customization :

Email field not being recognized in some places

Quote Reply
Email field not being recognized in some places
I have 2 email notifications setup. One for emailing the user after signup (signup consists of signup form and add_form with more info) with their username and password and the other emailing the user after they enter a record in the records db with the link to their record. It is also setup to email me, the admin, if an email address cannot be found. Well on the email after record added, it works fine, but on the email after signup, it isnt recognizing the email field so I keep getting all the emails instead of the users. This is even though the user just entered their user record via the add form in the users db. Both subs are setup the exact same way, so I dont understand why the notify sub in the records db would be recognizing the email, but the notify sub in the users db which is the main place the email field is stored would not recognize it.
Here is the sub for notifying the user after signup:

Code:
if ($rec{'Email'}) {
open

(MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $in{'Email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Welcome to StayFlorida.com\n\n";
print MAIL "Thank you for joining StayFlorida.com!\n";
print MAIL "\n";
print MAIL "Your username and password as registered are:\n";
print MAIL "Username: $in{'UserID'}\n";
print MAIL "Password: $in{'Password'}\n";
print MAIL "\n";
print MAIL "Please keep your login details in a safe place.\n";
print MAIL "\n";
print MAIL "If you have not already done so, you may now login to add your property listing(s).\n";
print MAIL "http://www.stayflorida.com\n";
print MAIL "\n";
print MAIL "Should you have any questions regaring your membership,!\n";
print MAIL "please contact webmaster\@wdu.net.\n";
print MAIL "\n";
print MAIL "Sincerely\n";
print MAIL "\n";
print MAIL "StayFlorida.com\n";
close MAIL;
}
else {
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: StayFlorida.com Signup\n\n";
print MAIL "A new user has been added to StayFlorida.com!\n";
print MAIL "An email address was not recognized by user:\n";
print MAIL "Username: $in{'UserID'}\n";
print MAIL "Password: $in{'pw'}\n";
print MAIL "\n";
print MAIL "Company: $in{'Company'}\n";
print MAIL "Name: $in{'Name'}\n";
print MAIL "Address: $in{'Address'}\n";
print MAIL "Address: $in{'Address2'}\n";
print MAIL "City: $in{'City'}\n";
print MAIL "State: $in{'State'}\n";
print MAIL "Province: $in{'Province'}\n";
print MAIL "Country: $in{'Country'}\n";
print MAIL "Phone: $in{'Phone'}\n";
print MAIL "\n";
close MAIL;
}

This is identical to the email notification after a record is added except for the body of the message. Does anyone have any idea why this wouldnt be working??
Quote Reply
Re: [wdu2002] Email field not being recognized in some places In reply to
Bumping this up in hopes for some help. Thanks
Quote Reply
Re: [wdu2002] Email field not being recognized in some places In reply to
Nevermind, no need to reply, got it working.
Quote Reply
Re: [wdu2002] Email field not being recognized in some places In reply to
What was the problem? <--started to reply to you twice, but each time I got side-tracked. Sorry.

I was going to say it had to do with carrying fields over from page to page and using $in{'field'} vs. $rec{'field'}
Quote Reply
Re: [Watts] Email field not being recognized in some places In reply to
Thanks for replying anyway. Im not exactly sure which of the issues it was, but I realized that I did not have a "confirmation" html_record display in my add_success page, only text that said "your record has been added, etc.". Also, in my html_record, I had mailto:$rec{'Email'} so I just took out the mailto text. But it seems to be working now, just as long as I can figure out how to add the password. Thanks again!