How do i send message to email?

Hi,
I need some help on how to do this,i have a registration form and i want that if the user will submit it will send message to his/her email,
can you help me please how to do this…
Thank you in advance and i am hoping for your positive response.

Hi jemz. Welcome to the forums. :slight_smile:

Unless you know a bit of PHP, it might be better to use a third party service like WuFoo. Otherwise, here are some links I’ve gathered over time:

http://css-tricks.com/139-nice-and-simple-contact-form/
http://css-tricks.com/examples/NiceSimpleContactForm2/
http://www.helpvid.net/tutorials/dreamweaver/php-script-download.html
http://green-beast.com/gbcf-v3/
http://www.freedback.com/
http://accessify.com/tools-and-wizards/accessibility-tools/quick-form-builder/
http://css-tricks.com/snippets/php/send-email/
http://seo-watch.com/hosting/mail_form.php
http://www.felgall.com/php2.htm
http://www.easyphpcontactform.com/manual.html
http://www.addressmunger.com/contact_form_generator/
http://webgeekworld.com/web_development_resource_details.php?id=42
http://www.webformfactory.com/
http://www.freecontactform.com/email_form.php
using Google docs
http://programmingkid.com/google-docs-contact-form-without-coding/

To further ralph.m’s recommendations, If you do know a little php then http://swiftmailer.org/ is a fantastic mail library for PHP. It allows you to do a number of advanced things, yet it has great documentation and can also be set to the most basic of needs.

Steve

I was using http://sourceforge.net/projects/phpmailer/ in a couple of projects. Easy to use, very robust.

Hi, sorry for my late reply.thank you so much for this link,i will write again to you.thank you so much for helping me.

Hi,thank you for helping me.i hope can learn more something in this forum…thank you again.

@mainlink…thank you so much for this…

Hi ralph.m

Thank you so much for all this links i will read this all and i will get back to you as soon as i can…thank you so much again to you.and more power to you always.

Hi, i get back on this thread because i want to ask just a simple sending email into the user email address,.because i am not yet familiar on those suggestion,…my point is can i use a mail function in php to send email,

I am just working on the local in my desktop is it possible to perform this sending mail in local?..i have registration just as simple form,i want that when i am going to click the register it will send to the email address…like yahoo or gmail…

secondly do i have something to do or to have configuration in my php.ini inorder to perform this sending mail…actually i have never tried this,but i want to learn on this.I hope you can help me and provide some steps…i just want to use simple sending email and after this i will try those suggestion in this thread.

Hi, i downloaded now the swiftmailer and also i extracted it, but i don’t know how to use this.

Doing this from your local computer often does require something extra like this. It’s easier just to test this online. Have you checked out the swiftmailer documentation?

yes i downloaded it and i extract the file, and then i read the documentation but i am confuse,i dont know how to install and used it…please help me on this.how can i used the swift mailer.

this is my code this is the first time i use swift mailer but i find dificulty to use.


<?php



require_once './lib/swift_required.php';

function swiftmailer_configurator() {
    // configure Swift Mailer

    Swift_DependencyContainer::getInstance();
    Swift_Preferences::getInstance();
}

Swift::init('swiftmailer_configurator');
Swift::init('swiftmailer_configurator');



// Create the Transport
$transport = Swift_SmtpTransport::newInstance('localhost', 25)
  ->setUsername('root')
  ->setPassword('')
  ;
  
// Sendmail
$transport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs');  
  
 //MAIL 
$transport = Swift_MailTransport::newInstance();


// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);





// Create the message
$message = Swift_Message::newInstance()





  // Give the message a subject
  ->setSubject('This is my subject')

  // Set the From address with an associative array
  ->setFrom(array('mygmail@gmail.com' => 'John Doe'))

  // Set the To addresses with an associative array
  ->setTo(array('tomyemail@yahoo.com' => 'A name'))

  // Give it a body
  ->setBody('Here is the message itself testing....!')


  ;



// Send the message
$result = $mailer->send($message);

 if($result==1)
   echo 'successfully send';
else {
	 echo 'failed to send';
}







It’s easier just to test this online

I have internet connection…but i don’t have domain like my www.mywebsite.com…I just want to test in local computer using swift mailer and can sent email to yahoo.com or gmail.com etc…I am really confuse how can i achieve this sending mail.i hope you can help me ralph.

Thank you in advance.

Can i use swiftmailer only for development purposes i am just in local computer but i have internet connection i just want to try to send email using swiftmailer,I hope you understand what i mean.

PHP and server stuff is not my area, and I haven’t used swiftmailer. You might need to earch for info on setting up your local server, such as this:

Hi ralph, thank you for the reply…okay i will try this link maybe this will help me…

Hi jemz,

The best way to test this is to set up a local WAMP or LAMP stack on your development computer. In swiftmailer use whatever smtp you use for your regular email and route via localhost or 127.1.0.0. The php can be ran and tweaked under the LAMP stack.

I recommend keeping it the simplest configuration at first - until you get the mail flowing - and then add complexity as you go.

I don’t have time right now to go through your configuration, so hopefully this helps get you pointed in the right direction.

Regards,
Steve

Hi ServerStorm,

Thank you for the reply…but how do i know the smtp that i use.

use whatever smtp you use for your regular email

I am using wamp here.

Hi ServerStorm,

Thank you for the reply…but how do i know the smtp that i use.

use whatever smtp you use for your regular email

I am using wamp here.