Killersites Community: email function - Killersites Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

email function email function

#1 User is offline   kirsiskaspars 

  • PipPip
  • View blog
  • Group: Member
  • Posts: 18
  • Joined: 31-January 12

Posted 10 April 2012 - 01:24 PM

Hello!

I'm working with killersites video tutorial and just turned to a little problem.
At the moment I have to work with email function. I am learning how to manage to
send smth to email adress.

Script that I wrote:

<?php

$words = " many words in this sentence...";
$result = str_word_count($words);
echo $result . "<br><br>";

$did_send = mail('kirsiskaspars@gmail.com','Killerphp.com Test Email', "The body message.");

echo " Email sent: ". $did_send;

?>


In the video everything based on this script works just fine, but
I have an issue which you can see in the picture (attachment)

I am a begginer in php, so really need your help.

Thank you!

Attached thumbnail(s)

  • Attached Image: Image 000.gif

0

#2 User is offline   Ben 

  • View blog
  • Group: Administrators
  • Posts: 5,409
  • Joined: 19-December 08
  • LocationChico, CA

Posted 10 April 2012 - 08:50 PM

In my experience, PHP's mail() function is something that is best used on an actual web server, not on your local machine running WAMP. It is possible to get the local server to send you emails, but it's a bit of a tricky process that requires editing your PHP.ini file with your SMTP/SMTP port details. If you aren't getting any errors other than that one, I think you can safely assume that the mail() function is working correctly, and you should receive email properly if you put the PHP file on an actual web server.
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
0

#3 User is offline   kirsiskaspars 

  • PipPip
  • View blog
  • Group: Member
  • Posts: 18
  • Joined: 31-January 12

Posted 11 April 2012 - 02:06 PM

View PostBen, on 10 April 2012 - 08:50 PM, said:

In my experience, PHP's mail() function is something that is best used on an actual web server, not on your local machine running WAMP. It is possible to get the local server to send you emails, but it's a bit of a tricky process that requires editing your PHP.ini file with your SMTP/SMTP port details. If you aren't getting any errors other than that one, I think you can safely assume that the mail() function is working correctly, and you should receive email properly if you put the PHP file on an actual web server.


Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users