Jump to content

Search the Community

Showing results for tags 'email'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 9 results

  1. Hi everyone Happy Holiday to everyone!!! I am trying to create the form contact in PHP. I created form contact in html, But next page - I'm not sure it is right script in PHP to send email to my gmail account. I asked the hosting company to see if their server can send email to my gmail account, they said yes, should be. So, I create script in PHP, I don't know if it is right script, i hope you will find something missing in this script. I followed exactly from website, I tested to send then I checked my gmail account, this email has not sent. Can you help? Here my script: <?phpif (isset($_POST['submitted'])) {$name = $_POST['name'];$email = $_POST['email'];$select = $_POST['select'];$text = $_POST['text'];} $to = "xxxxxxx@gmail.com";$subject = "ASL class";$message = "Message is from ".$name.".\n The type class is ".$select.".\n The message said: ".$text; mail($to,$subject,$message); echo "<p>Sent! Thank you for fill an E-mail form</p>";?> Thank you in advanced, Gary
  2. My code works, unless I send it to gmail, then the attachment doesn't show up, and the body shows: This is a multi-part message in MIME format. I'm assuming my headers are incorrect. $from = stripslashes($from_name)."<".stripslashes($from_email).">"; $uniqid = md5(uniqid(time())); $boundary = "--==_mimepart_".$uniqid; $headers = "From: ".$from."\n". 'Subject: '.$subject."\n". 'Reply-to: '.$from_email."\n". 'Return-Path: '.$from_email."\n". 'Message-ID: <'.$uniqid.'@'.$domain.">\n". 'Date: '.date("r", strtotime("now"))."\n". 'Mime-Version: 1.0'."\n". 'Content-Type: text/html;'."\n". ' boundary=PHP-mixed-'.$boundary.";\n". ' charset=UTF-8'."\n". 'X-Mailer: PHP/' . phpversion(); $headers .= 'Content-Type: multipart/mixed; boundary="'.$uniqid.'"\r\n\r\n'; $headers .= 'This is a multi-part message in MIME format.\r\n'; $headers .= '--'.$uniqid.'\r\n'; $headers .= 'Content-type:text/html; charset=iso-8859-1\r\n'; $headers .= 'Content-Transfer-Encoding: 7bit\r\n\r\n'; $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x"; $message = $html; $count_uploaded_files = count( $uploaded_files['attachments']['tmp_name'] ); if($uploaded_files['attachments']['name'][0] != ""){ $headers .= "Content-Type: multipart/mixed;\r\n" . " boundary=\"{$mime_boundary}\""; $message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; for( $i = 0; $i < $count_uploaded_files; $i++ ) { $tmp_name = $uploaded_files['attachments']['tmp_name'][$i]; $type = $uploaded_files['attachments']['type'][$i]; $name = $uploaded_files['attachments']['name'][$i]; $size = $uploaded_files['attachments']['size'][$i]; if (file_exists($tmp_name)){ if(is_uploaded_file($tmp_name)){ $file = fopen($tmp_name,'rb'); $data = fread($file,filesize($tmp_name)); fclose($file); $data = chunk_split(base64_encode($data)); } $message .= "--{$mime_boundary}\n" . "Content-Type: {$type};\n" . " name=\"{$name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; } } $headers .= "--".$uniqid."--"; $message.="--{$mime_boundary}--\n"; }//end files sent mail($to_addresses, $subject, $message, $headers);
  3. Hi, I have the attached page that uploads files to the server and then emails the intended recipient, however I can't figure out how to include the link to the uploaded files. Everything else works just fine, so any help on this would be much appreciated. thanks, MsKazza P.s. if anyone could point me in the direction of how to make my upload section like the attach files portion of these forum posts would love to upgrade mine. thanks. index.php
  4. I am running a registration website where users receive email confirmation after successful registrations. About 4000 registrations/emails per year. Only after real "human" registration is submitted, a confirmation email goes out. I receive 0 spam/bot registrations. Nowhere on my site you will find a page where anyone can just enter email address and receive email without email and "human" verification. I have a Business Plan from HostGator and a dedicated IP address. I am using swiftmailer, and I had been using it for years with no issues until now. Emails are send from email address under my domain (confirmation@my_domain.com) and not through third party email client. On Dec, 1st 2015 I have gotten first email bounce stating that my IP in on Spamhaus list. I did some research and found that my HostGator account did not have SPF enabled, so I enabled it (DKIM was on). I have removed the IP address from the Spamhaus list, but 12 days later I got another bounced email and I am on the list again. CBL utility states: "It (IP) shows signs of being infected with a spam sending trojan, malicious link or some other form of botnet. This IP is infected (or NATting for a computer that is infected) with the kelihos spambot. In other words, it's participating in a botnet." I am not sure what to do about this as this is a web hosting server. All the results I got in regards to " kelihos" were related to business network, and individual computers being compromised. Any ideas on how I can go about fixing this would be appreciated. I am relatively new at all this, so use small words Thanks -Peter
  5. Hi guys, I am trying to create a simple PHP script to send a new password to my users using the script below. I believe it was working however seemed to stop after a few tests. Any ideas why? Thanks $rand_password_md5 = md5($rand_password); $sql = "UPDATE Users SET password = '$rand_password_md5' WHERE username = '$code' AND Base = '$base'"; $result = mysqli_query($cxn,$sql) or die ("Can not change your password in our database."); // the email reply // use wordwrap() if lines are longer than 70 characters $msg = wordwrap($msg,70); // send email $to = $row['Femail']; $subject = "website.com | Password reset requested."; $txt = "Hi ".$row['Ffname'].", Please go back to www.website.com and login with your username ".$row['username']." and new password ".$rand_password.". You can then change your password by going to 'Settings' > 'Personal Settings'.!"; $headers = "From: noreply@website.com" . "\r\n" . "CC: info@website.com"; mail($to,$subject,$txt,$headers);
  6. I am using a phpmailer to send emails to users. I noticed that it only sends email if I am calling it from a page in a root directory. Say I am sending an email from contact.php and it's inside a sub folder/directory instead of the root, it won't email out. Setup is like this. include_once '../phpmailer/class.phpmailer.php'; $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = '127.0.01'; // Specify main and backup server $mail->From = 'hello@myemail.com'; $mail->FromName = 'Myname'; $mail->AddAddress($user_email); // Name is optional $mail->WordWrap = 50; // Set word wrap to 50 characters $mail->IsHTML(true); // Set email format to HTML $mail->Subject = 'Your account has been deleted!'; $mail->Body = "Hello {$username},<br><br> We are letting you know that your account has been deleted"; if(!$mail->Send()) { $errors[] = $mail->ErrorInfo; } else { if(empty($errors)) { $db->commit(); $success = 'Email sent.'; } else { $db->rollBack(); } }
  7. Sorry that the topic is cryptic but I am unsure how to ask the question. I have written and been using a php client contact ticket system for many years using phpmailer. The problem I have is when I send an email out to a client they reply using the "reply" button in the email program and ignore the "please click here to reply " which takes them to the site where they can log in and be shown all previous correspondence etc etc . What I would like is for the clients to be able to reply using their outlook (or similar) email program but their reply and other details be stored in mysql Is this possible ? Thanks and any help is greatly appreciated
  8. I'm attempting to modify the email message body based on a users input to a form. I'm using the code shown here as a starting point: https://stackoverflow.com/questions/40345116/manipulate-ninja-forms-mail-body?answertab=votes#tab-top Unfortunately even the most rudimentary change to the message body does not seem to work, and I'm unable to find any additional documentation on the ninja_forms_action_email_message filter. Has anyone attempted to modify the email message body upon submission? Here's what I'd like to achieve. If the user submits "Yes" to a question, then I would add a list item to the body of the email I send them. If they answer "No", then no list item would be added. Thanks so much! ~Sarah
  9. Hello im new to PHP and i have problems getting PHP working for my websites contac form Here the HTML form code <form action="" method="post"> <div class="form_settings"> <p><span>Name</span><input class="contact" type="text" name="your_name" value="" /></p> <p><span>Email Address</span><input class="contact" type="text" name="your_email" value="" /></p> <p><span>Message</span><textarea class="contact textarea" rows="8" cols="50" name="your_enquiry"></textarea></p> <p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="contact_submitted" value="submit" /></p> </div> </form> Heres the PHP code <?php $field_name = $_POST['cf_name']; $field_email = $_POST['cf_email']; $field_message = $_POST['cf_message']; $mail_to = 'example@gmail.com'; $subject = 'Message from '.$field_name; $body_message = 'From: '.$field_name."\n"; $body_message .= 'E-mail: '.$field_email."\n"; $body_message .= 'Message: '.$field_message; $headers = 'From: '.$field_email."\r\n"; $headers .= 'Reply-To: '.$field_email."\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); if ($mail_status) { ?> <script language="javascript" type="text/javascript"> alert('Sent'); window.location = 'kontakt.html'; </script> <?php } else { ?> <script language="javascript" type="text/javascript"> alert('Error'); window.location = 'kontakt.html'; </script> <?php } ?> I would be really thankful if someone could fix the PHP code for me and make it work with the html above.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.