Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tayfun, kodlar aşağıdaki gibi
- <?php
- $fullname=trim($_POST["fullname"]);
- $emailaddress=trim($_POST["emailaddress"]);
- $message=trim($_POST["message"]);
- $to = "mail@yahoo.com, mail@gmail.com";
- $subject = "Contact Form";
- $message = "
- <html>
- <head>
- <title>HTML email</title>
- </head>
- <body>
- <h1 style='padding:5px; background-color:#fff; border:1px dotted #0cf; margin-bottom:5px; width:800px; font-size:16px'>Academic Food Contact Form</h1>
- <h4 style='padding:5px; background-color:#fff; border:1px dotted #0cf; margin-bottom:5px; width:800px; font-size:14px;'>Name-Surname: $fullname</h4></br>
- <h4 style='padding:5px; background-color:#fff; border:1px dotted #0cf; margin-bottom:5px; width:800px; font-size:14px;'>E-mail Address: $emailaddress</h4></br>
- <h5 style='padding:5px; background-color:#fff; border:1px dotted #0cf; margin-bottom:5px; width:800px; font-size:14px;'>Your Message: $message</h5>
- </body>
- </html>
- ";
- // Always set content-type when sending HTML email
- $headers = "MIME-Version: 1.0" . "\r\n";
- $headers .= "Content-type:text/html;charset=utf-8" . "\r\n";
- // More headers
- $headers .= 'From: ('.$fullname.')'.$emailaddress . "\r\n";
- mail($to,$subject,$message,$headers);
- echo "<font color=blue>Received your message</font>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement