Jump to content

Search the Community

Showing results for tags 'Mail'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

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


Languages

Found 14 results

  1. Hi everyone, I am running into an issue when I am sending out emails using the mail() function. What I am trying to do is on one page, there is a text area that enters information into a form and sends it to another php to process. Here is the form: <form method='POST' action='../home/contact-send-email.inc.php'> <div class='input_form'> <input type='hidden' name='cid' value='".$rowcon['cid']."'><br> <input type='hidden' name='from' value='".$_SESSION['email']."'><br> <input type='hidden' name='email' value='".$rowcon['email']."'><br> <input type='text' name='subject' placeholder='Subject'><br> <textarea style='width: 103.5%; height: 500px; resize: none;' type='text' name='message' placeholder='Message'></textarea><br> <button type='submit'>Send Mail</button> </div> </form> Now with the text area, I want it to allow line breaks. The issue I am running into now is that when I send email out, I am getting the text but were I put the line breaks, there is a \r\n in text. Here is the mail process php: <?php include '../inc/dbh.php'; $from = mysqli_real_escape_string($conn, $_POST['from']); $msg = mysqli_real_escape_string($conn, $_POST['message']); $to = mysqli_real_escape_string($conn, $_POST['email']); $subject = mysqli_real_escape_string($conn, $_POST['subject']); $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type:text/html; charset=UTF-8\r\n"; $headers .= "From: ".$from."\r\n"; $headers .= "X-Mailer: PHP 5.x\r\n"; $txt = nl2br($msg); mail($to, $subject, $txt, $headers); ?> So quick over view: When I send an email out using this code and there are line breaks in there, where the line breaks are happening, in the email there is \r\n instead of the line break.
  2. It's been a long time since that PHP class in college, and the majority of my focus since graduating has been on HTML5 / CSS3 / JavaScript. I'm getting ready to go live with a new website. I have a contact form build with HTML5 and CSS3 with validation done with JavaScript. The only problem is, I'll need a PHP script to send the form via email. Is there a basic, easy to use script that someone could recommend? Also, is it possible that my web host (I'll possibly be going with Go Daddy) will make such a script available? I'm hoping to find something that's essentially plug and play. Thank you
  3. westman

    mail() max loop

    I have used this code... $to = '1@gmail.com'; $to2 = '2@gmail.com'; $to3 = '3@gmail.com'; mail($to, $subject, $message, $headers); mail($to2, $subject, $message, $headers); mail($to3, $subject, $message, $headers); And it works well to send mail to many people at the same time. I have sent mail to 20 people at the same time with this code. My question is: Is there a maximum number (a limit) of emails this code method will work with?
  4. Hello everyone. We have recently updated an application web based named ISOKEY for ISO documentation (a documentation manager working in IIS), in a Windows 2003 server for Small Business SP2. We had it working ok with a non SSL config in the e-mail SMTP settings, after we tried to change to gmail mails stopped from sending. So I made a smtp-relay for using port 25 (smtp) with no SSL enabled. For some reason the logging in windows says that the body is incorrect: So I was wondering if the XML where the smtp configuration is, should be updated too. I'm uploading the XML, and what I'm asking is (because I can't see an error in the body it seems everything is fine) is there any change we should do for it to work? Thank you very much in advance for any advice or tip you can give me. Best, M. xml_post.xml Edit: Since the code for the XML is kind of short, I'll post it right here for a better lecture of it. <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.net> <mailSettings> <smtp deliveryMethod="Network" from="ISOKEY"> <network host="smtp-relay.gmail.com" port="25" userName="my@account.com" password="mypassword" defaultCredentials="false" /> <!-- --> </smtp> </mailSettings> </system.net> <system.diagnostics> <sources> <!-- This section defines the logging configuration for My.Application.Log --> <source name="DefaultSource" switchName="DefaultSwitch"> <listeners> <add name="FileLog"/> <!-- Uncomment the below section to write to the Application Event Log --> <!--<add name="EventLog"/>--> </listeners> </source> </sources> <switches> <add name="DefaultSwitch" value="Information"/> </switches> <sharedListeners> <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=VAR, processorArchitecture=MSIL" initializeData="FileLogWriter"/> <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --> <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> --> </sharedListeners> </system.diagnostics> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="IKTypes_43" publicKeyToken="VAR" culture="neutral"/> <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="IKTypes_50" publicKeyToken="VAR" culture="neutral"/> <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
  5. I would like to create a a random number with random_bytes(). Can I just store the random_bytes output in the database field? Is that for instance more secure? And, regarding to sending it by email, what is the advantage above sending a code like uniqid() or md5($_POST['var'] + microtime() ? I see the screen output is a bit uncommon (with ? in a diamond ) does that have to do with the encryption? And is that the reason why reason bin2hex is used to decrypt? this is the code I would like to use: <html> <center> <br><br><br> the output of the function random_bytes is: <br><br> <?php $num = random_bytes(15); echo '<br><br>' . $num ; echo '<br><br> var dump of random_bytes with bin2hex: ' ; echo bin2hex($num); ?> </center></html>
  6. Hello, this is my site: http://feriapixel.cl/cleanway/index.html In this index.html file i have a form with method post that takes all the input from the user and send it to formulario.php using post. This is the form: <form action="formulario.php" method="post"> <div class="form-group"> <input type="text" class="form-control" id="nombre" placeholder="Nombre" name="nombre"> </div> <div class="form-group"> <input type="text" class="form-control" id="nombre" placeholder="Apellido" name="apellido"> </div> <div class="form-group"> <input type="text" class="form-control" id="nombre" placeholder="Número Móvil" name="telefono"> </div> <div class="form-group"> <input type="mail" class="form-control" id="nombre" placeholder="Email" name="email"> </div> <button type="submit" class="btn btn-ganarplata">QUIERO GANAR MÁS PLATA<br> VENDIENDO CLEAN WAY</button> </form> And this is the formulario.php script: <?php header('Location: index.html'); $nombre = $_POST["nombre"]; $apellido = $_POST["apellido"]; $telefono = $_POST["telefono"]; $email = $_POST["email"]; // the message $msg = "<html> <head> <title>Formulario Clean Way</title> </head> <body> <p><b>Nombre:</b> <br> ". $nombre ." </p> <p><b>Apellido:</b> <br> ". $apellido ." </p> <p><b>Teléfono:</b> <br> ". $telefono ." </p> <p><b>Email:</b> <br> ". $email ." </p> </body> </html>" ; // More headers $headers .= 'Content-Type: text/html' . "\r\n"; // use wordwrap() if lines are longer than 70 characters $msg = wordwrap($msg,70); if ($_SERVER["REQUEST_METHOD"] == "POST") { // send email mail("felipepinoredes@gmail.com","Formulario Contacto",$msg, $headers); } ?> I never receive the message on my gmail inbox. What am i doing wrong? My site is hosted on Hostgator using a re-seller account, it's using PHP 7.0.
  7. Hello I'm following w3schools' PHP tutorial and i'm trying to send an html mail: http://www.w3schools.com/php/func_mail_mail.asp But the HTML part of the mail doesn't work, i get my mail with all the html tags written literally, like this: Is something missing? This is my code: <?php $msg = "<html> <head> <title>HTML email</title> </head> <body> <p>This email contains HTML Tags!</p> <table> <tr> <th>Firstname</th> <th>Lastname</th> </tr> <tr> <td>John</td> <td>Doe</td> </tr> </table> </body> </html> "; // More headers $headers .= 'From: <webmaster@example.com>' . "\r\n"; $headers .= 'Cc: myboss@example.com' . "\r\n"; // use wordwrap() if lines are longer than 70 characters $msg = wordwrap($msg,70); if ($_SERVER["REQUEST_METHOD"] == "POST") { // send email mail("felipepinoredes@gmail.com","Formulario Idea",$msg); } ?>
  8. Hello everyone! This is my very first PHP document, and i must admit, i have no experience or knowledge about PHP, i looked at an example and tryd to connect the dots to create this one. It works better than expected, but I do encounter a few issues, where I would very much like to have some advise with. Problem 1: The data from the form gets mailed to me, but even though everything in the form is filled in, I would only receive the "E-mail: INPUT@HOTMAIL.COM" The rest of the data like: "Meetnaam: " Were blank, as if the data did not exist. The form did check correctly wether this information was provided, but seems not to provide so in the e-mail send to me. Problem 2: $meetnaam should be the subject of the e-mail. Problem 3: $email should also be the e-mail adress asigned to the sender, as such, I can easily reply. Problem 4: The checkbox, $akkoord, should be checked, if not, an error should be displayed, I do not know how to do this. Your help with this problem is very much apreciated! Once again: I am new to this, so try to be very specific (if you would even be so kind, type it out and put the update in bold text) =D This is the PHP and HTML code I used respectively: PHP HTML
  9. luisda2994

    Usage of mail()

    Hello, I need to be able to send a form to a real email address using mail(), however every solution I find has to do with uploading the website to a host, and due to the nature of my project that's not possible. It must run in my own computer and still be capable of sending emails. Any example, code or help appreciated. Thanks
  10. Salam or Hello @ All, It's me Bilal since a very long ago, today I'm posting this topic because I'm dive into a problem which is: I want to send a email after collecting data from html form which is pretty simple with the help of PHP but can the same functionality can be performed by using just JavaScript only? if so please discuss the possibilities on this topic. Don't be tell about the mailto function of the html because it is not good at all. I'm waiting for your pretty responses......
  11. I created a form that willl automatically send what it's filled in via email.. What is annoying is when i don't fill in the form and click submit.. The mail function also works... Can you tell me how to make it not send anything when the form isn't filled in ?
  12. Conan

    PHP Mail() Problem

    Hello everyone, I'm new here, and I don't know where am I suppose to post this, but I think it's here .So, as the title says, my problem is that I've made everything correct, but the mail doesn't send to my email, or to the email I want, but it passes the code (I mean it gives me that "successfuly sent"), but when I check my email, there is nothing . here is the code, please id there is anything wrong tell me <?PHPfunction checkrow11($query1) { $query = mssql_query($query1); if(mssql_num_rows($query) > 0) { return true; } else { return false; } }/////////////////////////////// Coded By Conan ///////////////////////////////////if(isset($_POST['recover'])){ $email = $_POST['emadd']; if($email == '') { $err = "Fill in all the empty fields please."; } else { if(checkrow11("SELECT * FROM Account WHERE Email = '".$email."'") == true) { $query111 = odbc_exec($connect, "SELECT UserID FROM Account WHERE Email = '".$email."'"); odbc_fetch_row($query111); $userid = odbc_result($query111, 1); $query112 = odbc_exec($connect, "SELECT Password FROM Login WHERE UserID = '".$userid."'"); odbc_fetch_row($query112); $pswd = odbc_result($query112, 1); $to = $email;$subject = "ID/Password Recover";$message = "Your UserID: ".$userid."<br>Your Password: ".$pswd;$headers = "From: Staff Team";$sent = mail($to, $subject, $message, $headers); if($sent){ $err="<font color='lightgreen'>Sent Successfuly.</font>";}else{ $err="Something went wrong, please try again later.";} } else { $err = "The E-mail you have entered is incorrect, or it's NOT found."; } }}?><div id="simplepage"><div id="simpletitle"><span style="margin-left:6px;">ID/Password Recovery</span></div><center><font size="2"><br><br>To recover your ID & Password, please enter your e-mail address in the field below.<br>The e-mail must be the ID's e-mail, you have used when you created the account.<br><br></font></center><form method="post" action=""><table id="registertable"><tr><td>Your E-Mail Address:</td><td><input type="text" maxlength="30" class="simpleinput" id="emadd" autocomplete="on" name="emadd"/></td></tr><tr><td><input type="Submit" name="recover" value="Recover !"></td><td></td></tr></table></form><br><br><center><font color="lightblue" size="2">A massage wil be sent to your e-mail, includes your ID/Password.</font></center><br><br><center><font color="pink" size="2"><?=$err;?></font></center></div>
  13. iam faceing problem in installing SquirrelMail in localhost. please help me...
  14. Hi all I have a MS Server 2008R2 set up with IIS7 In IIS I have set up an SMTP (with the IIS6 requirements) and the standard PHP that you get with it all. The SMTP server works. Reason we have to use a local SMTP server to interface with our actual mail server is because the external server requires TLS authentication and many smaller office scanning machines don't support it. I am able to send mail through the SMTP without issue, both from an office MFP and from a mail client like Outlook 2010. The PHP works too. I have it displaying PHP webpages and even going as far as accessing ODBC data resources. However, the two of them don't work together. I create a basic webpage that is as follows: <html><body> <?php if (mail("me@example.com","Test Subject","Test body")) {echo "success";} else {echo "failed";} ?></body><html> I also have the following in the PHP.ini I found in "C:\Program Files (x86)\PHP\v5.3\" [mail function]SMTP = localhostsmtp_port = 25sendmail_from = no-reply@example.com And yet, all I get is "failed" each time I have run the webpage. Anyone have any ideas on where I can get the PHP/SMTP/Other logs to give me more information? I have monitored the queue folder for the SMTP and it doesn't seem to even receive the mail from the PHP site.
×
×
  • Create New...