LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-01-2013, 03:12 PM   #1
martinlangley
Member
 
Registered: Nov 2008
Posts: 69

Rep: Reputation: 0
mail from php (oscommerce)


Hi

You guys are the best.

Please forgive me for posting a MAC OSX problem, - its using php, xampp and Oscommerce so its nearly Linux (I hope).

The Oscommerce software is generally fine and has the
added benefit of being customisable in php if you're willing to make the effort (and take the risk!)

I have enhanced mine with a calender download which has been extensively modified and now works as I want it to (give or take).

The problem is that the code which sends out email booking confirmations doesn't (and has never) worked.

The Mac mail software works fine so its not a network problem, and I've set up php.ini etc but still no joy.

Code fragment below, any ideas?

------------------------------------------------

$lese_kd = "SELECT customers_firstname, customers_lastname FROM " .
TABLE_CUSTOMERS .
" WHERE customers_id = " . $y_customers_id;
$y_erg_kd = MYSQL_QUERY($lese_kd);
$y_anz_kd = MYSQL_NUMROWS($y_erg_kd);
if ($y_anz_kd > 0)
{
$y_kd_firstname =
mysql_result($y_erg_kd,0,"customers_firstname");
$y_kd_lastname =
mysql_result($y_erg_kd,0,"customers_lastname");
}

$email_subject = sprintf(TEXT_EMAIL_SUBJECT_DELETE);
$email_subject = $email_subject . " " . $y_kd_firstname . " "
. $y_kd_lastname;

$email_text = $y_customers_id . " " . $y_kd_firstname . " " .
$y_kd_lastname . "<br>" .
ENTRY_CAL_ID . ": " . $calendar_id;
$email_body = TEXT_EMAIL_INTRO_DELETE . $email_text;

// an, email-an, subject, mailtext, von, email-von
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS,
$email_subject, $email_body, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

---------------------------------------------

Many thanks in advance

ML
 
Old 06-02-2013, 03:25 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
1.
The builtin mail function in PHP is this:
mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

I don't know tep_mail function. But of course it may exist in the application. It seems very strange that there are parameters mentioned twice in your tep_mail call (STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS). A copy-paste error maybe?

2.
You can setup php to send emails with sendmail or with an SMTP server. What's your setting in php.ini?

So you can try to use the builtin mail function described above. Set the content type and from header.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - Mail.php and Mail/mime.php issues LVsFINEST Linux - Server 1 02-08-2009 05:44 PM
Want to send mail with php mail() command - minimum config required? FeathersMc Linux - Server 2 10-26-2008 12:21 AM
Fedora Core includes PHP? Why won't it recognize OSCOMMERCE download? TSynergy Linux - Software 4 05-16-2004 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration