Seguimos con los howtos este how to tambien es corto simplemente hace lo que se necesita


  • Conocimiento basico de PHP
  • PHP previamente instalado
  • Servidor de correo previamente instalado

Primero que nada necesitamos un formulario con digamos 2 campos que son:

  • El correo del destinatario
  • El Mensaje que le vamos a enviar

Aqui esta el codigo para el archivo form_mail.html

<form method="post" action="sendmail.php">
    <table width="25%" border="0">
            <td colspan="2">Envio de correos </td>
            <td width="10%">Para</td>
            <td width="90%">
                <input name="email" type="text" id="email" />
            <td valign="top">Mensaje</td>
                <textarea name="mensaje" cols="50" rows="5" id="mensaje"></textarea>
            <td colspan="2">
                <input type="submit" name="Submit" value="Enviar" />

Como podemos observar el action de la forma es un archivo llamado sendmail.php que se encargara de enviar el correo.

Y por ultimo vamos a crear nuestro archivo que enviara el correo
Aqui esta el codigo del archivo sendmail.php

 * Comentario extraido de http://www.php-es.com/function.mail.html
 * (Sólo en Windows) Cuando PHP sostiene comunicación con el servidor SMTP directamente, 
 * si un punto es encontrado al comienzo de la línea, éste es removido. 
 * Para contrarestar este comportamiento, reemplace estas ocurrencias con dos puntos
$mensaje=str_replace("\n.", "\n..", $mensaje);

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From:<micorreo@miservidor>' . "\r\n";

mail($email,”Titulo del corrreo”,$mensaje,$headers);

como ya es costumbre aqui esta el

94 Respuestas para “Enviar correo con PHP”

  1. Dante
    desde Mexico Dijo:

    Andale Wama haciendo mas mejor compartiendo el codigo con la raza, hechale ganas


  2. sdfsdf
    desde Spain Dijo:



  3. victor
    desde Bolivia Dijo:

    Creo que el correo jamas llegara a destino ya que olvidaste algo fundamental, reemplazar “correodestino” por la variable correspondiente:

    cambiar esto:
    mail(“correodestino”,”Titulo del corrreo”,”$mensaje”,$headers);

    por esto:
    mail(“$email”,”Titulo del corrreo”,”$mensaje”,$headers);

    aun asi falta explicar como es que $email logra tener el valor del form.


  4. victor
    desde Bolivia Dijo:

    otra cosa las comillas estan por demas…

    mail($email,”Titulo del corrreo”,$mensaje,$headers);


    Ruben Omar August 27th, 2008 8:26 pm

    Ruben Omar desde Mexico Dijo:

    Mil gracias por el comentario ya quedo actualizado, :P


  5. cristian
    desde Colombia Dijo:



  6. Masilva
    desde Venezuela Dijo:

    El archivo sendmail.php que viene en el archivo zip que se descarga viene vacio


    Bliser May 10th, 2010 11:31 am

    Bliser desde Peru Dijo:

    se necesita de un servidor de correos para que funcione el script


  7. gift ideas for women
    desde Dijo:

    My cousin is officiating At my tomorrow and does not need something, and this was the perfect gift for that man who likes to produce breakfast
    for his kids and anyone else in work.


  8. Sabrina
    desde Dijo:

    Dating sites are for finding sex partners…not lifetime partners- thats nonsense people delude themselves with.


  9. lasertest
    desde Dijo:

    Aw, this was a really nice post. Finding the time
    and actual effort to create a good article_ but what can I say_ I
    put things off a whole lot and don’t seem to get anything done.


  10. tips to quit smoking
    desde United States Dijo:

    Hi, constantly i used tips to quit smoking check website posts here in the early hours
    in the break of day, since i like to gain knowledge of more and more.


  11. plan culturel artistique
    desde Dijo:

    Aangezien mensen al zo lang – en vaak
    - drugs еn seks mеt elkaar
    combineren, z᧐u је denken dаt ᴡe ⅾе
    twee inmiddels uitstekend begrijpen.


  12. shadow fight 2 apk real
    desde United States Dijo:

    Great site you have got here.. It’s hard to find high quality
    writing like yours nowadays. I seriously appreciate individuals like you!
    Take care!!


  13. Lottery Eth
    desde Dijo:

    Not only in quality, in terms of quantity as well, DISH Network has crafted its name in the industry.

    In particular, you may want to browse through the following collections.

    The scene of Katniss Everdeen hunting in the woods of District 12.
    Graphs with origins other than zero distort gradients
    and variations.


  14. Bob
    desde Dijo:

    Para fazer coelhinho, passe molde dele para E.V.A usando uma magrelo de churrasco para n


  15. khoa hoc seo
    desde Dijo:

    Nice post. I learn something new and challenging on websites I stumbleupon everyday.

    It’s always helpful to read articles from other writers and practice something from
    their web sites.


  16. pedacitodecielo.com
    desde Dijo:

    I would like to show my admiration for your generosity supporting people that
    actually need help on the subject matter. Your personal dedication to getting the solution across has been extremely powerful
    and have all the time enabled employees like me to realize their goals.
    This helpful instruction can mean a whole lot a person like me and additionally to my colleagues.
    With thanks; from all of us.


  17. dao tao seo hcm
    desde Dijo:

    Hello, you used to write fantastic, but the last few posts have been kinda boring?

    I miss your tremendous writings. Past several posts are just a little bit out of track!
    come on!


  18. web site
    desde Dijo:

    Era, dessarte, uma oportunidade


  19. web site
    desde Dijo:

    Era, dessarte, uma oportunidade


    desde Dijo:

    Some truly grand work on behalf oof the owner
    of this internet site, deadd great subject material.

    my page SGP CREDIT


  21. www.tmz.com
    desde Dijo:

    Aѕ soon aѕ I oᥙnd this web sіtе
    I ᴡеnt οn reԁԀіt
    tο ѕhаге ѕomе ߋf
    the ⅼߋѵe ѡіtһ them.

    Hеre іѕ mmу ԝeb paɡе :: ⅯacFɑrⅼɑne Gгoսⲣ Μагҝ Сսrгу;


  22. __________ ____ ________
    desde Dijo:

    I’m no longer sure where you are getting your info, however
    good topic. I must spend some time finding
    out more or figuring out more. Thank you for great info I was searching for this info for my mission.


  23. Best tactical Gear
    desde Dijo:

    Apple Watch offeers a lot beyond health monitoring that even at $350, I am bought.

    Take a lokk at my blog post; Best tactical Gear


  24. blue light color filter
    desde Dijo:

    Please let me know if you’re looking for a article author for your
    blog. You have some really great posts and I think
    I would be a good asset. If you ever want to take some
    of the load off, I’d really like to write some material for
    your blog in exchange for a link back to mine. Please blast me an email if interested.


  25. round metal drying rack
    desde Dijo:

    Hellο it’s me, I am alsо νіѕіting thіѕ ᴡеb ѕіtе rеɡulɑrⅼy,
    tһіѕ ԝeƄ ρaցе іs
    tгuⅼу nicе аnd tһе
    սѕeгs arе гeɑllу ѕһaring gօοd thοᥙցһts.


  26. etsy
    desde Republic Of Korea Dijo:

    You actually make it appear so easy along with your presentation but I in finding this topic to be actually one thing
    that I believe I would by no means understand. It seems too complicated and extremely large
    for me. I am looking forward in your subsequent post, I
    will try to get the grasp of it!


  27. esponja konjac ecotools
    desde Dijo:

    If some ߋne needs expert view on the topic of running a
    Ьlⲟɡ aftегѡarԀ і гeϲօmmеnd hіm/һeг tο ⲣay a ᴠiѕіt thіs ѡebρаɡе, Қеер ᥙρ tһе ɡߋоd ϳߋb.

    Feel frее
    tο sᥙгf t᧐ mʏ ѡѡeƅ
    ƅⅼoɡ; esponja konjac ecotools


  28. ___ _____ _______
    desde Dijo:

    All listed Makkah resorts can be booked online.


  29. ___ _____ ___
    desde Switzerland Dijo:

    Anjum Accommodations – Makkah, All Rights Reserved.


  30. poker queen
    desde Dijo:

    A great poker tip to win the poker game is by confusing people which is generally known as bluffing.
    The bottom of the page gives some more ideas and perspectives on deception in poker.

    Once you have formed a friendship with the Sim,
    try out some of the romantic interactions with the Sim.
    Even it’s not easy to get six pack, you can easily achieve
    it as long as you got discipline and patience to the numerous exercises in repetition for a long period of time.


  31. _____ ______
    desde Dijo:

    Qatar Airways is predicated in Doha, the capital of


  32. http://hustlehubmentoring.com/groups/singapore-the-flow-east-coast/
    desde Switzerland Dijo:

    By examining the brand new expertise that has
    quickly swept the global scene, we start to discern that the worldwide presence of the Internet has
    severe future implications for intercultural


  33. stone street furniture
    desde Dijo:

    I am reɑlly іnsрlіrеd alօng ᴡitһ
    үօᥙг wrіtіng tɑlentѕ ɑnd aⅼѕo ԝith thе layօᥙt tt᧐ ʏοսг Ƅlοɡ.
    Iѕ tһаt thіs a ρaіⅾ ѕᥙЬjесt
    օr Ԁііԁ ʏоս сսѕtօmіze іt
    Anyԝау қееp սр tһеe еⲭcеllent ԛuаⅼіtʏ ѡrіtіng, it іѕ ᥙncߋmmօn tо ⅼоoҝ а
    nicе Ƅⅼߋg lіκe thіѕ one tһеѕе ɗаүѕ..

    Fееⅼ fгeе to vіѕіt
    mү bⅼⲟց
    stone street furniture


  34. steel driveway grates
    desde Dijo:

    Τhis inf᧐ is іnvаlᥙaЬⅼe.
    Ηοԝ сɑn I find οᥙt mогe?

    Feеl fгeе tߋ ѕᥙгf t᧐ mʏ ԝeƄ-sitе
    steel driveway grates


  35. ___ _____ ___
    desde Dijo:

    Have tried many accommodations in Dubai in the past.


  36. sportowefakty _u_el tabela
    desde Dijo:

    magnificent issues altogether, you just won a emblem new reader.
    What might you suggest about your post that you simply
    made a few days in the past? Any positive?


  37. calgary pro painters
    desde Dijo:

    I have been surfing online more than five hours today
    for calgary pro painters & Enviar correo con PHP , yet I never
    found any interesting article like yours. It is pretty
    worth enough for me. In my view, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before.


  38. projektowanie wn_trz program online
    desde Dijo:

    Pretty component of content. I simply stumbled upon your site and in accession capital to
    claim that I acquire actually enjoyed account your blog posts.
    Anyway I will be subscribing for your feeds and even I fulfillment
    you get admission to consistently quickly.


  39. ____________
    desde Thailand Dijo:

    I was excited to uncover this page. I want to to thank you for your time
    for this particularly wonderful read!! I definitely savored every bit of it and I
    have you saved to fav to see new stuff in your site.


  40. _____ _______
    desde Dijo:

    A unified kingdom was founded circa 3100 BC by King Narmer,
    and a series of dynasties dominated in Egypt for the following three millennia.


  41. deck drain covers
    desde Dijo:

    I liκe thіѕ Ƅ᧐оg
    ѕο mսch, ƅоߋқmɑrκed.

    mү һοmeⲣаցе
    deck drain covers


  42. n_p ti_n cf mobile
    desde United States Dijo:

    Fastidious respond in return off this difficulty with firm
    arguments and explaining the whole thing about that.


  43. john wick chapter 2 online
    desde Dijo:

    Per Deadline, original stars Lance Reddick, John Leguizamo, Bridget Moynahan and Tom Sadowski may also
    be returning for John Wick: Chapter 2. Reddick will reprise the
    character of Charon, the Continental Hotel manager who gives lodging for
    a range of assassins that are fascinating.

    My web page john wick chapter 2 online


  44. bezoek de site
    desde Netherlands Dijo:

    Great post. I was checking constantly this blog and I am impressed!

    Very useful information particularly the last part :) I care for such information much.
    I was looking for this particular information for a very long time.
    Thank you and good luck.


  45. Anonymous
    desde France Dijo:

    I’m extremely pleased to discover this page. I wanted to thank you for your time
    for this fantastic read!! I definitely liked every bit of it and I have you saved to fav to check
    out new stuff on your web site.


  46. home improvements
    desde Dijo:

    I believe what you published was actually very reasonable.
    But, think on this, what if you added a little information? I am not suggesting your content is
    not good, however what if you added a post title that makes people desire more?
    I mean Enviar correo con PHP | [DeliriumLabs Blog] is kinda plain. You could peek at Yahoo’s front page and see how
    they create post titles to get viewers to click. You might
    add a related video or a pic or two to get people interested about everything’ve got to say.
    Just my opinion, it would bring your website a little livelier.


  47. alazharparekampunginggriskediri.blogspot.com
    desde Dijo:

    This article gives clear idea in support of the new users of
    blogging, that really how to do blogging.


  48. sell a house fast
    desde United States Dijo:

    It’s impressive that you are getting thoughts from this paragraph as well as from our argument made here.


  49. Anonymous
    desde Dijo:

    I must thank you for the efforts you’ve put in writing this
    site. I’m hoping to view the same high-grade content
    from you in the future as well. In fact, your creative writing abilities has inspired me to get my very own blog now ;)


  50. gamescrash
    desde Dijo:

    There were a variety of instances in all three games (ESPECIALLY in Crash 1) I had to take
    a leap of faith as a result of i didn’t know was i going to undershoot or overshoot
    the platform I was going to land on and precipitated me to lose a giant
    number of lives.


  51. www.mondoral.org
    desde Romania Dijo:

    Este Texto me convenceu de uma coisa, eu honestamente sinto que
    este blog precisa de muita aten


  52. Thay mat kinh cam ung iphone x xach tay o dau tot
    desde Thailand Dijo:

    Therefore, the i – Phone 5 is in fact guaranteed to be released this summer.
    A laptop is usually a pain to keep and setup each time you
    fancy a quick browse online. First off, there’s Reuters, which can be claiming that the smartphone goes into production in August, as well as a September release.


  53. gamescrash
    desde Dijo:

    While quite a lot of care has been taken to enrich the completely different worlds of
    Crash Bandicoot, the new, detailed rendering truly threw me
    off at times.


  54. Thay pin iphone 5c xach tay o dau tot
    desde Denmark Dijo:

    But most importantly now Siri works extremely well in almost any application that is launched from the user.
    A laptop is usually a pain to hold and setup every time you fancy
    a quick browse online. Right in the cab fare to hotel
    charges, Concur enables users to import data from charge cards, check, approve and
    submit expense reports and manage their airfares, hotels and dining


  55. dog fight
    desde Sweden Dijo:

    Thank you, I’ve recently been looking for info about this topic for ages and
    yours is the best I have discovered till now.
    However, what about the conclusion? Are you positive about the


  56. marbella Delineados de cejas pelo por pelo pelo a pelo
    desde Dijo:

    Wow! After all I got a weblog from where I can genuinely take valuable facts concerning
    my study and knowledge.


  57. ______
    desde Dijo:

    Hi, I want to subscribe for this webpage to obtain newest updates, so
    where can i do it please help out.


  58. Maquillaje Permanente en marbella
    desde Switzerland Dijo:

    I’m impressed, I must say. Rarely do I encounter a blog that’s both
    educative and entertaining, and let me tell you, you’ve hit the nail on the head.
    The issue is something too few folks are speaking intelligently about.
    Now i’m very happy that I stumbled across this during my hunt for something relating to this.


  59. pozycjonowanie stron kurs video
    desde United States Dijo:

    In advance online marketing, it really is customer centric
    approach which in turn wins. The best way to deal with this problem would be to insert precise keywords like-
    . s so simple, in support of link building offers this kind of great return on investment.


  60. Jamie
    desde Dijo:

    I loved ass much as you’ll receive carried out right
    here. The sketch is tasteful, your authored material
    stylish. nonetheless, you command get got an shakiness
    over that you wish bee delivering the following.
    unwell unquuestionably come more formerly again as exactly the same nearly a lot often inside case you shield this increase.

    my blog; pay for papers online – Jamie


  61. www.dobre-plaszcze.pl
    desde Dijo:

    Ciekawy wpis, og


  62. marbella Delineados de cejas pelo por pelo pelo a pelo
    desde Dijo:

    Thanks on your marvelous posting! I certainly enjoyed reading it, you can be a great
    author. I will be sure to bookmark your blog and will
    often come back in the foreseeable future. I
    want to encourage you to continue your great job, have a nice morning!


  63. Gabriella
    desde Dijo:

    I don’t even know how I finished up right here, however I believed this submit was once great.
    I don’t recognize who you are however definitely you are going to a famous blogger should you aren’t already.


  64. fake generator credit card
    desde Dijo:

    That is a good tip particularly to those fresh to the blogosphere.
    Short but very accurate information? Thank you for sharing this one.
    A must read post!


  65. free seo
    desde Sweden Dijo:

    It’s an amazing post in support of all the online users;
    they will get benefit from it I am sure.


  66. Hair Tonic Penumbuh Rambut
    desde Dijo:

    Unquestionably imagine that that you said. Your favorite reason seemed to be on the
    internet the easiest thing to understand
    of. I say to you, I certainly get irked at the same time
    as other people think about worries that they just do not understand
    about. You managed to hit the nail upon the top and also outlined out
    the entire thing without having side effect , people could
    take a signal. Will likely be again to get more.



  67. QQ
    desde Dijo:

    I think that what you published made a bunch of sense. However, what about this?
    suppose you were to write a awesome headline? I ain’t saying your content isn’t solid, however suppose you added a headline that
    makes people desire more? I mean Enviar correo con PHP |
    [DeliriumLabs Blog] is kinda plain. You ought to glance at Yahoo’s home page and
    see how they create news titles to grab viewers interested.

    You might add a video or a related picture or two to get readers excited about
    everything’ve written. Just my opinion, it might make your posts a little livelier.


  68. her response
    desde Dijo:

    My coder is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of
    the expenses. But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for about a year and am anxious
    about switching to another platform. I have heard great things about blogengine.net.
    Is there a way I can import all my wordpress posts into it?
    Any help would be really appreciated!


  69. sallybradway29002.myblog.de
    desde Dijo:

    The COMPUTER SYSTEM SYSTEM 2007 elite is really a software application that has been developed over
    of a number of years and in excess of $275,000 has entered into its testing as well as retesting.

    Advertising and marketing companies were sneakily doing this without
    the knowledge of customers and even the designers.


  70. Oren
    desde Dijo:

    The ca remote needs to be instructed to the car, then while
    you are pushing the integrated in remote in the auto.
    a person has to press and release the red discover button. I push the button that keeps the program in my remote, yet after
    that press the button that opened my garage door to close
    it, but it will not shut my garage door.


  71. more information
    desde Dijo:

    It’s really a nice and useful piece of information. I’m satisfied
    that you simply shared this useful information with us.
    Please keep us informed like this. Thanks for sharing.


  72. Thay vo samsung galaxy j3 pro tai da nang
    desde United States Dijo:

    One of the most advanced smartphones on the market today is
    becoming an upgrade. Apart from appealing dimensions, its multimedia and
    connectivity features attract most of the customers.
    But the phone also incorporates other colors which you could select, of course Samsung is renowned for its
    top the charts attractive gadgets as well as cellphone technology is not an exception.


  73. dummy credit card generator
    desde Dijo:

    That is a really good tip especially to those new to the blogosphere.
    Brief but very precise info? Appreciate your sharing this one.
    A must read post!


  74. trench drain shower
    desde Dijo:

    I always was concerned in this subject and stock stijll am, thanks for putting up.

    My webpage trench drain shower


  75. clash royale cards
    desde Dijo:

    Treasure Chests: want multiple card at a time?


  76. Maquillaje Permanente en marbella
    desde Dijo:

    Wonderful items from you, man. I have remember your stuff previous to and you’re simply too great.
    I really like what you’ve bought right here, certainly like what you’re stating and the best way by which you assert it.
    You are making it enjoyable and you still take care of to stay
    it sensible. I can’t wait to read much more from you. This is really a wonderful website.


  77. http://www.stylowakasia.pl/
    desde Viet Nam Dijo:

    Super wpis, og


  78. pinimufun.picturepush.com
    desde France Dijo:

    It’s really very complicated in this full of activity life to listen news on TV, so I only use
    the web for that reason, and get the latest information.


  79. forum.core4x4.ca
    desde Dijo:

    Please let me know if you’re looking for a author for your blog.
    You have some really good posts and I think I would be a good asset.
    If you ever want to take some of the load off, I’d love to write some material for your blog in exchange for a link back to mine.
    Please shoot me an e-mail if interested. Many thanks!


  80. Anonymous
    desde United States Dijo:

    Super Post, oby_ajn


  81. www.misvulva.com
    desde Australia Dijo:

    I believe everything said was actually very reasonable. However, think on this, suppose
    you added a little content? I mean, I don’t want to tell you how to
    run your blog, however suppose you added something to maybe
    grab folk’s attention? I mean Enviar correo con PHP | [DeliriumLabs Blog] is a little plain. You ought to look at
    Yahoo’s front page and see how they create article headlines to get people interested.
    You might add a video or a related picture or two to get
    readers interested about everything’ve written. Just my opinion, it could bring
    your posts a little bit more interesting.


  82. agencia de viagens blumenau
    desde Dijo:
  83. cau hinh camera quan sat
    desde United Kingdom Dijo:

    It’s amazing to pay a visit this site and reading the views of all colleagues about this article, while I am also keen of getting


  84. ________ _______
    desde Dijo:

    I get pleasure from, result in I discovered exactly what I used to be looking for.
    You have ended my 4 day lengthy hunt! God Bless you man. Have a nice
    day. Bye


  85. web site
    desde Dijo:

    Le mieux c’est en priv


  86. mold inspections charlotte
    desde Dijo:

    You can definitely see your skills within the work you write.

    The world hopes for more passionate writers such as you who aren’t afraid to say how they believe.
    Always follow your heart.


  87. freecinemamovies
    desde Dijo:

    Wow, fantastic weblog layout! How lengthy have you been blogging for?
    you made running a blog glance easy. The overall glance of your
    site is excellent, let alone the content


  88. www.flickr.com
    desde Dijo:

    Hi there, its fastidious paragraph concerning media print,
    we all understand media is a wonderful source of facts.


  89. sucralfate buy now mastercard uk
    desde Dijo:

    I think that what you wrote was very logical. But, consider
    this, suppose you typed a catchier title? I am not saying your content is not good, however what if you added a title to possibly get folk’s attention? I
    mean Enviar correo con PHP | [DeliriumLabs Blog] is kinda vanilla.
    You could peek at Yahoo’s front page and watch how they create article titles to grab viewers to click.
    You might try adding a video or a related picture or two to grab people interested about everything’ve
    written. Just my opinion, it might bring your posts a little livelier.


  90. Roseanne
    desde Dijo:

    Nice post. I was checking constantly this blog and I’m impressed!
    Very useful info specifically the final part :) I handle such info
    a lot. I used to be seeking this certain information for a very long time.
    Thank you and best of luck.


  91. a
    desde Dijo:

    You actually make it seem really easy together with
    your presentation but I find this topic to be really one thing that I believe I might never understand.
    It seems too complex and extremely large for me.

    I’m looking ahead for your next post, I will try to get the hold of it!


  92. como engravidar mais rapido possivel
    desde Dijo:

    Siga essa dica importante dе ⅽomo engravidar r