Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mmail = getc(emailc);
- $subject = "Contacto via WEB";
- $mail = $_POST['email'];
- $msg = $_POST['message'];
- if (trim($mail) == '' || $mail == '' || $msg == '') {
- $errmsg[] = 'Erro ao enviar email.';
- $_SESSION['ERRMSG'] = $errmsg;
- session_write_close();
- header("location:contact.php");
- break;
- }
- $headers = "From: $email";
- $sent = mail($mmail, $subject, $message, $headers);
- if($sent) {
- $errmsg[] = 'Email enviado.';
- $_SESSION['ERRMSG'] = $errmsg;
- session_write_close();
- header("location:contact.php");
- break;
- }else{
- $errmsg[] = 'Email não enviado.';
- $_SESSION['ERRMSG'] = $errmsg;
- session_write_close();
- header("location:contact.php");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement