Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / No email for account creation

No email for account creation

Locked

Views: 1,583

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
13 Feb 2008, 11:54 PM
#1
dakkon76 avatar

dakkon76

New Zenner

Join Date:
Feb 2008
Posts:
8
Plugin Contributions:
0

No email for account creation

Hi there...

I've been able to figure most things out on my own, but I've hit a wall trying to figure out why I don't get a welcome message when creating a new account. I've got my email configured properly and I can email customers from admin once created... but no welcome email. I've modified my /includes/modules/TEMPLATE/create_account.php file to not check for address and a bunch of things, since I only sell virtual products I only need their name/email address... but I haven't touched the section where it creates and sends the welcome email, and I don't get an error message.

Is there a flag somewhere where welcome emails must be turned on, and I'm missing it? That would sure be a nice fix, but I'm sure it won't be quite that simple :/

Here's the section of my file that sends the email:

 // build the message content
    $name = $firstname . ' ' . $lastname;

    if (ACCOUNT_GENDER == 'true') {
      if ($gender == 'm') {
        $email_text = sprintf(EMAIL_GREET_MR, $lastname);
      } else {
        $email_text = sprintf(EMAIL_GREET_MS, $lastname);
      }
    } else {
      $email_text = sprintf(EMAIL_GREET_NONE, $firstname);
    }
    $html_msg['EMAIL_GREETING'] = str_replace('\n','',$email_text);
    $html_msg['EMAIL_FIRST_NAME'] = $firstname;
    $html_msg['EMAIL_LAST_NAME']  = $lastname;

    // initial welcome
    $email_text .=  EMAIL_WELCOME;
    $html_msg['EMAIL_WELCOME'] = str_replace('\n','',EMAIL_WELCOME);

    // add in regular email welcome text
    $email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_GV_CLOSURE;

    $html_msg['EMAIL_MESSAGE_HTML']  = str_replace('\n','',EMAIL_TEXT);
    $html_msg['EMAIL_CONTACT_OWNER'] = str_replace('\n','',EMAIL_CONTACT);
    $html_msg['EMAIL_CLOSURE']       = nl2br(EMAIL_GV_CLOSURE);

    // include create-account-specific disclaimer
    $email_text .= "\n\n" . sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, STORE_OWNER_EMAIL_ADDRESS). "\n\n";
    $html_msg['EMAIL_DISCLAIMER'] = sprintf(EMAIL_DISCLAIMER_NEW_CUSTOMER, '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS .' </a>');

    // send welcome email
    zen_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_NAME, EMAIL_FROM, $html_msg, 'welcome');
14 Feb 2008, 2:49 AM
#2
marcelo63 avatar

marcelo63

Zen Follower

Join Date:
Dec 2007
Posts:
125
Plugin Contributions:
0

Re: No email for account creation

I did not ready your modified filed. But did you check in the admin for the email configuration including smtp and port # ??

14 Feb 2008, 3:27 AM
#3
dakkon76 avatar

dakkon76

New Zenner

Join Date:
Feb 2008
Posts:
8
Plugin Contributions:
0

Re: No email for account creation

marcelo63:

I did not ready your modified filed. But did you check in the admin for the email configuration including smtp and port # ??

Yes, as I said, email for the site is working. When I click on my new user I created under customers and send an email through this interface, everything works fine... I just don't get the initial email that says "Welcome, thanks for creating an account" ... you know? Not sure why :/

22 Feb 2008, 1:17 PM
#4
dakkon76 avatar

dakkon76

New Zenner

Join Date:
Feb 2008
Posts:
8
Plugin Contributions:
0

Re: No email for account creation

Still can't get account creation email to work. Can anyone help??

24 Feb 2008, 10:47 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: No email for account creation

Hoping that you have used the override system or know which files you have altered...

I suggest that you use default files to get this working first...

Then when working you can attempt your alterations and know if these changes are breaking anything.