Jump to content

Search the Community

Showing results for tags 'email'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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 (PhpStorm, VS Code, 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 8 results

  1. 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
  2. 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: [email protected]" . "\r\n" . "CC: [email protected]"; mail($to,$subject,$txt,$headers);
  3. 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
  4. 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 = "[email protected]";$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
  5. I have the following html code for a form; <form action="email.php" method ="POST" > <label>Name</label><br> <input type="text" value="" class="form" name ="name"><br> <label>Email</label><br> <input type="text" value="" class="form" name ="email"><br> <label>Message</label><br> <textarea rows ="3" class ="form" name ="message"></textarea> <label></label><br> <input type="submit" value="submit"> </form> the form has the action of a file called email.php-this file is meant to send the users details to an email address using the mail function. It contains the following; <html> <body> Thankyou <?php echo $_POST["name"]. ","; ?> <br> <?php echo $_POST["email"]; ?> Will be contacted soon. <?php $to = "[email protected]"; $name = $_POST["name"]; $email =$_POST["email"]; $message = $_POST["message"]; $subject="Web Design"; $headers = 'From:'. $email . "\r\n" . 'Reply-To:'. $name . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers) header("Location: index.html")?> </body> </html> I have tried the code with a working email address however none of it seems to work- what happens is when the submit button is clicked the user is redirected a plain white page ("/email.php"). Looking for help urgently. Kind Regards, R.
  6. I am emailing off my server and its really slow. I think the problem is my logic, not the code. Current speed is about 30-40 emails per minute. I need to get it up to at least 175/min but I was really hoping for more like 700/min. The server is a Dual Hexa-Core 2.4Ghz with 32gb ram and dedicated to only this task. All server reports show low resource usage. The logic flow is like this: 1. Get email content. 2. Loop through records in database. 3. Check record against some other tables (ie unsubscribe table) 4. If record checks then send email by file_get_contents passing all the email content through get variables. 5. Other script is basic email script. See below: <?php //GET VAR INPUT $to = htmlentities($_GET['to']); $friendly_from = htmlentities($_GET['friendly_from']); $email_from = htmlentities($_GET['email_from']); $subject = htmlentities($_GET['subject']); $text = htmlentities($_GET['text']); $html = $_GET['html']; $html = '<head><title>' . $subject . '</title></head><body>' . $html . '</body>'; //SEND EMAIL # Setup mime boundary $mime_boundary = 'Multipart_Boundary_x' . md5(time()) . 'x'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\r\n"; $headers .= "Content-Transfer-Encoding: 7bit\r\n"; $headers .= "Reply-To: " . $email_from . " \r\n"; # Add in plain text version $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/plain; charset=\"charset=us-ascii\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $text; $body.= "\n\n"; # Add in HTML version $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/html; charset=\"UTF-8\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $html; $body.= "\n\n"; # End email $body.= "--$mime_boundary--\n"; # <-- Notice trailing --, required to close email body for mime's # Finish off headers $headers .= "From: " . $friendly_from . " <" . $email_from . ">\r\n"; $headers .= "X-Sender-IP: " . $_SERVER[SERVER_ADDR] . "\r\n"; $headers .= 'Date: ' . date('n/d/Y g:i A') . "\r\n"; //Mail it out $response = mail($to, $subject, $body, $headers); //RESPONSE (Success = 1, Fail = 0) echo $response; die(); ?> The entire thing runs on a cron job every minute checking with a lock to prevent multiple instances as the file usually executes for about 5 minutes. I have tried turning off parts of the code and retesting such as many of my database look ups but as you would expect they optimize by like 1% or something very little like that. The thing that takes a long time is the actual sending of the email. So how to get that to go faster?
  7. I am trying to send a basic email that is multipart via the mail() function in php. I am not interested in using PHPmail. This should be very light weight. Currently when I send email to gmail, it is sending the html part as plain text so all the tags are showing. Here is my code: //GET VAR INPUT $to = htmlentities($_GET['to']); $friendly_from = htmlentities($_GET['friendly_from']); $email_from = htmlentities($_GET['email_from']); $subject = htmlentities($_GET['subject']); $text = htmlentities($_GET['text']); $html = htmlentities($_GET['html']); //SEND EMAIL # Setup mime boundary $mime_boundary = 'Multipart_Boundary_x' . md5(time()) . 'x'; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\r\n"; $headers .= "Content-Transfer-Encoding: 7bit\r\n"; $headers .= "Reply-To: " . $email_from . " \r\n"; # Add in plain text version $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/plain; charset=\"charset=us-ascii\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $text; $body.= "\n\n"; # Add in HTML version $body.= "--$mime_boundary\n"; $body.= "Content-Type: text/html; charset=\"UTF-8\"\n"; $body.= "Content-Transfer-Encoding: 7bit\n\n"; $body.= $html; $body.= "\n\n"; # End email $body.= "--$mime_boundary--\n"; # <-- Notice trailing --, required to close email body for mime's # Finish off headers $headers .= "From: " . $friendly_from . " <" . $email_from . ">\r\n"; $headers .= "X-Sender-IP: " . $_SERVER[SERVER_ADDR] . "\r\n"; $headers .= 'Date: ' . date('n/d/Y g:i A') . "\r\n"; # Mail it out return mail($to, $subject, $body, $headers); Here is what I am receiving. (And yes I can accept html emails).
  8. 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 = '[email protected]'; $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.