Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MVS tep_mail() issue


al3x

Recommended Posts

I have traced a problem with my installation to an issue with the tep_mail() function.

 

Basically, in a couple of places tep_mail is called like this:

 

if (tep_mail ($the_name, $the_email, EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID, $email . '<br>', STORE_NAME, STORE_OWNER_EMAIL_ADDRESS) ) $vendor_order_sent = 'yes';

 

I'm not an expert but am I right in thinking that this is expecting tep_mail to return a non-null value?

 

i.e IF tep_mail(...) then $vendor_order_sent = 'yes';

 

The problem is that tep_mail is running and sending the email just fine, however it is returning nothing and therefore $vendor_order_sent is never set to 'yes'.

 

Any suggestions gratefully received!

 

thanks,

 

Alex

Link to comment
Share on other sites

That's actually a but in the tep_mail() function. It returns false if SEND_EMAILS is false, otherwise it returns nothing. This can be fixed by changing the last line to:

    return $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);

I haven't tested this, so please test before relying on it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks Jim, I'll give it a try!

 

As far as I know I am running the standard version of tep_mail() so I can't see how MVS would ever have worked with it like that?

 

thanks,

 

Alex

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...