Hi, thanks for the reply.
How would one go about setting up sendmail?
Main Topics
Browse All TopicsI'm setting up an online store using Magento (Just on localhost at the moment) and i'm stumbling across a few problems with the emails.
I've set up the email templates in System > Transactional Emails and also set up the necessary fields in System > configuration > web > contacts, but it's not working.
When attempting to use the contact form, I just get the error:
"Unable to submit your request. Please, try again later".
The problem is much the same with the sales emails. The order goes through fine on the system but the email doesn't send.
Any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
try adding a from
it shouldnt need one but just to check , i will sort out ur php.ini file if it still errors
<?php
$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$from = "";
if (mail($to, $from, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
- From the lines above, uncomment SMTP, smtp_port and sendmail_from
directives, then add SMTP server, SMTP port number and your preferred email address to SMTP, smtp_port and sendmail_from directives respectively, your final code should be similar to the one below:
[mail function]
; For Win32 only.
SMTP = mail.server.com
smtp_port = 25
; For Win32 only.
sendmail_from = something@server.com
1. Modify your sendmail.ini
Your sendmail.ini should be located in C:\xampp\sendmail\sendmail
1. smtp_server
2. auth_username
3. auth_password
Get them filled in, an example would be as follows:
[code]smtp_server=smtp.jus
auth_username=outgoing@jus
auth_password=dp2hsn12[/co
Most SMTP servers require authentication. I just setup an email through my Media Temple account. (By the way, i.justrealized.com is hosted by Media Temple, if youre interested in their service and would be kind enough, consider quoting RYNSE.COM without quotes as your referrer. This would give me a bit of discount for my yearly subscriptions. Thanks.)
2. Modify your php.ini
XAMPP places the php.ini inside C:\xampp\apache\bin\php.in
[code]sendmail_path = "C:\xampp\sendmail\sendmai
And thats all. Now for some testing.
3. Lets test it out
[code lang="php"] $from_name = "Justrealized";
$from_email = "outgoing@justrealized.com
$headers = "From: $from_name <$from_email>";
$body = "Hi, \nThis is a test mail from $from_name <$from_email>.";
$subject = "Test mail from Justrealized";
$to = "somewhere@justrealized.co
if (mail($to, $subject, $body, $headers)) {
echo "success!";
} else {
echo "fail&";
}
?>
The mail is transferred as lines of text.
There is a convention (defined is some RFC) which says that to know the border between the lines of the header and the beginning of the content, you need an empty line.
Not sure if your mail program generates it... just add '\n' before the first line of your content, in case it is just this stupid thing which blocks you.
Interestingly, I got your test script to send an email using samwoods method further up.
[mail function]
; For Win32 only.
SMTP = mail.server.com
smtp_port = 25
; For Win32 only.
sendmail_from = something@server.com
I just needed to restart apache.
Though, this hasn't fixed my initial problem with sending emails through magento. I tried putting the '\n' just before the first line of content which didn't help either.
Any more ideas anyone?
- Solving the problem as you did exactly matches at least my suggestion in item 2 just on the preceding post.
- That mail is correctly sent thru php is also the result of oncommenting elements in php.ini
So you solving the problem results from the various experts contributions, and we would find fair that you acknowledge these.
Business Accounts
Answer for Membership
by: samwood09Posted on 2009-08-10 at 07:55:52ID: 25060462
if its on your localhost thats why it can sometime cause errors, due to sendmail not beign set up