PHP Tutorials: Sending email (Part 1)


Using the mail function, I show you how to create a very basic script. With a little tweaking of our php.ini file, we can send an email from php very easily!

18 Responses to “PHP Tutorials: Sending email (Part 1)”

  • paulmariz says:

    hey php master, your tutorial is great..but can you teach me how to create a atm transaction with balance inquiry, deposit, withdrawal, and money transfer?..pls?..

  • romanbrkz says:

    when user registar the activation link will send on his inbox can you tell me how to send this activation or this email to two persons for eg one for registared person and one for admin

  • valiyev007 says:

    you have to pay to access yahoo’s smtp server, though you don’t for gmail’s. Yahoo Hosting Supports PHP Smtp Mail Sending Functions.

  • computertrick says:

    @mahesh0018 try changing the port gmail’s default port is 587 change it to yahoos default smtp port

  • mahesh0018 says:

    my mail Function doesn’t work with yahoo but it works with yahoo…I sent mails using my web site
    but it woks with gmail can you help me??

  • 1713162434 says:

    excelent work! congrats… but How can I send emails from da localhost… using for example mercury as smtp server? Thank you

  • phpbb2byprzemo says:

    Very Good Tutorial! 5/5
    I’m newbie PHP.

  • MrRajesh2709 says:

    Hi Alex ! really a good job. I am using Apache2tried and tried ths mail fucntion.
    But it is not working. I am not receiving emails pls help …Thanks a lot Alex

  • ericrichard7 says:

    Hey there. How are you? I’ve been watching your video’s about php scripts. I’ve followed every directions as described on your video and when I typed the last message on my page (just like the last part on this video) nothing happened. I opened the file directly from firefox and tried it and nothing works. All I’m getting is the text box and and the name and message labeled. Can you please help me?

  • rianoalejo says:

    Thank you!!! Good tutorial
    Could you provide me setting or software name for record your window, is very good.

  • hsw786 says:

    thank you for your prompt response, I have been searching on the internet for the last two days, but I couldn’t find any useful material, actually the problem is that in order to have the SMTP authentication you need to use packages like PEAR MAIL PACKAGE etc, and i have no idea how to install it and use it, dats y out of desperation I thought asking you. I will be really grateful if you can have your input in it. :) cheers

  • phpacademy says:

    If you google for ‘php send email smtp’ you should find some code on smtp authentication. Hope this helps, if you need more help on it, just message me.

  • hsw786 says:

    I really like your tutorial and the way you have explained it has made the work look much easier, since I am a student of the university of Sheffield, so therefore I have got my user account and I want to send emails through the university SMTP server, port number and through my account’s authentication. Is that a way around I can send through that. So could you please help me on this. tc

  • McSebSixty1 says:

    you helped me a lot i luv ur vids

  • liuhi says:

    hi how do i run it no the local host

  • phpacademy says:

    Yeah don’t wory, I’ll never charge for them!

  • fibertech9 says:

    I have always wanted to know this! Thank You! Your videos are amazing. Knowledge like this should always be free.

  • montage12333 says:

    cheers pal

Leave a Reply