Hi, I have created an order form on the link below When a person fills up the form, and goes o the payment, I want that all info which he entered, must be emailed to us. But I dont know how to do this. The PHP files of all the 4 forms are attached. I want to add email function in that way that on Preview page, when a user submit the information and directed to payment processor, its info should be sent to our desired email ID. Can anyone help?
Check out this code from w3shools so you can see how simple it is actually. <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> PHP: http://www.w3schools.com/php/php_mail.asp
If you are using php then you can uise simple mail function if you want to send text mail but you should check with your server hwo many mails you can send. For sending mail wiht an attachment either you have to use library or you should have a class to send with an attachment if you dont know how to make customized one in php
You'll be sending details in your email about the user so you need to set up your $message part of that email example: $message = $firstname . " " . $lastname . "\r\n" . "Address line1 " . " " . $address _line1 . "\r\n" . (etc.. all the addy info then the product info) "Product: " . " " . $product . "\r\n" ; then when $message is called, all of that information will be in the body /message of the email. dont send credit cards that way...unless you are encrypting. GNuPg (or a server side secure system)