Jump to content

salman_ahad@yahoo.com

Members
  • Posts

    167
  • Joined

  • Last visited

    Never

Everything posted by salman_ahad@yahoo.com

  1. The mails I sent to folks in my database using mail(function) are going in spam?? Any idea how I rectify this issue?
  2. @Alex : What is the Sql script to delete duplicate rows in table* ??
  3. I am getting a Sql Syntax error, whats wrong?? I am trying to insert unique emails from submit email table to unique table. <?php require('includes/connection.php'); $result = mysql_query("SELECT DISTINCT email_address FROM submit_emails")or die(mysql_error()); if(!empty($result)) { while($row = mysql_fetch_array($result)) { $e = $row['email_address']; $query = mysql_query("INSERT INTO unique (email) VALUES ('$e')")or die(mysql_error()); } } ?>
  4. I am still not getting the email From mentioned address. I am still getting from name@xxxxx.xxxx.xx.server.net (which is my hosting server) $headers = 'From: ansari@ideatoceo.com' . "\r\n" . What could be wrong now?
  5. I am already using Headers to attach my email template. I am still getting mail as From : Myname@xxxxx.12345.xxxx.server.net (I am still not getting From : ansari@ideatoceo.com) My code <?php $to_email = "mohammed.ahad@gmail.com"; $Headers = 'From: ansari@ideatoceo.com' . "\r\n" . $subject = "Greetings"; $message = '' . '<table width="676">' . '<tr>' . '<td width="30" height="52"><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="50" alt="Corner" /></td>' . '<td width="600"><img src="http://www.ideatoceo.com/emails/Top.gif" width="600" height="50" alt="Top" /></td>' . '<td width="30"><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="50" alt="Corner" /></td>' . '</tr>' . '<tr>' . '<td><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="200" alt="Lside" /></td>' . '<td> <p>Asalam-alikum,</p>' . '<p>This EID get 30 calling minutes to Saudia Arabia FREE from <a href="http://www.rebtel.com/u/0131701413" target="_blank">Rebtel </a> , for New or Returning users. </p>' . '<p>Visit add credit and use the promotional code "Saudi30".</p>' . '<p><img src="http://www.ideatoceo.com/emails/Center.gif" alt="Center" width="600" height="8" align="absbottom" /></p>' . '<p>Awareness brought to you by <a href="http://www.ideatoceo.com/islam-emails.php" target="_blank">IdeatoCEO </a></p></td>' . '<td><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="200" alt="Rside" /></td>' . '</tr>' . '<tr>' . '<td><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="25" alt="Corner" /></td>' . '<td><img src="http://www.ideatoceo.com/emails/Bottom.gif" width="600" height="25" alt="Bottom" /></td>' . '<td><img src="http://www.ideatoceo.com/emails/Side.gif" width="30" height="25" alt="Corner" /></td>' . '</tr>' .'</table>' .'<table>' .'Forwarding Hadith to friends is now easy, visit <a href="http://www.ideatoceo.com/islam-emails.php" target="_blank">IdeatoCEO </a><br />' .'<a href="http://www.ideatoceo.com/islam/emails.php" target="_blank">Unsubscribe</a> from the distribution<br />' .' <br />' .'www.ideatoceo.com | 192 allen ave | Saint Louis | MO | 63104 <br />' .'</table>'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to_email, $subject, $message, $headers); ?>
  6. I need to use the FROM address in mail function. I don't know what is the proper syntax. $to_email = "info@ideatoceo.com"; $from_email = "ansari@ideatoceo.com"; $subject = "Greetings"; $message = "Hi"; mail($to_email, $subject, $message); //proper syntax to use FROM address???
  7. Its fixed... thanks I just had to reference those gif files from "picture.gif" to "http://mysite.com/picture.gif" And it worked..
  8. The email is received in the template form...but those gif images are missing ?? Where those gif images are supposed to come, it is showing missing image sign. Any help
  9. This doesn't work my frd...it sends the message as <table>.........Hi <td width......> We want to use the HTML table and its images which it calls and send only HI
  10. Are you sure echo is going to work, because I would be using mail() function at the end right???
  11. I am trying to send email in for of a template <?php $to_email = "info@ideatoceo.com"; $subject = "Greetings"; $message =?> <table width="676"> //Getting unexpecting ';' here <tr> Hi <td width="30" height="52"><img src="Side.gif" width="30" height="50" alt="Corner" /></td> <td width="600"><img src="Top.gif" width="600" height="50" alt="Top" /></td> <td width="30"><img src="Side.gif" width="30" height="50" alt="Corner" /></td> </tr> </table> I am getting a unexpected';' How can I properly arrange the table here?
  12. Thats right Alex... but I fixed it by altering the files. But thanks u showed me something new...
  13. I am getting a warning and fatal error stating the file is not present??
  14. Myfile "file1.php" is in [content] folder I need to include a file "connection.php" which is in [include] folder These two folders [content] and [include] are at same level. How do I require("connection.php") in file1.php
  15. I need to send email to people in my database. But I need to send in template form. Any help?
  16. There are some duplicate strings too... how to check and remove duplicate entries in that array? if ($_POST['Submit']) { $e = array(); $para = $_POST['para']; $emails = preg_split( '@[ <>;:,\\\\/"{}*!?=+]@', $para ); foreach ($emails as $email) { if( empty($email) || (stristr($email, '@') === FALSE) || (stristr($email, '.') === FALSE) ) continue; $e[]= $email;//.'<br \>'; } foreach($e as &$v) { $v = preg_replace('%\.\s*[^\s\.]+\K\s+[^\.]+$%', '', $v); echo $v.'<br \>'; } }
  17. if ($_POST['Submit']) { $e = array(); $para = $_POST['para']; $emails = preg_split( '@[ <>;:,\\\\/"{}*!?]@', $para ); foreach ($emails as $email) { if (empty($email)) { continue;} if(stristr($email, '@') === FALSE) { continue;} else { $e[]= $email;//.'<br \>'; continue; } } } //$regexp = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/'; foreach($e as &$v) { $v = preg_replace('%\.\s*[^\s\.]+\K\s+[^\.]+$%', '', $v); echo $v.'<br \>'; }
  18. I am getting a warning, Warning: Invalid argument supplied for foreach() My code $e = array(); { ... $e[] = $stringsOfData //I am taking all the strings in $e array. ... } } foreach($e as &$v) { $v = preg_replace('%\.\s*[^\s\.]+\K\s+[^\.]+$%', '', $v); echo $v.'<br \>'; }
  19. I have array of data(strings each containing different words) Need to check first dot(.) from right of the string. Then need to delete the remaining words starting from second(2) word example 1) this is the string.checking for period. hello1 hello2 hello3 // delete hello2 hello3 2) this is second string, want to delete. Hi Bye. Bye1 Bye2 3 4 5 6 // delete Bye2 3 4 5 6
  20. Now this is my updated code to take junk of data and catch only email addresses. <?php if ($_POST['Submit']) { $para = $_POST['para']; $emails = preg_split( '@[ <>;:,\\\\/"{}*!?]@', $para ); //split the para when there are signs encountered, excluding '@', '.', '_' foreach ($emails as $email) { if (empty($email)) { continue;} if(stristr($email, '@') === FALSE) { continue;} else { echo $email.'<br \>'; continue; } } } //$regexp = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$/'; ?> Now this is my input data abwbasit2002@yahoo.com ---- Forwarded Message ---- From: Sattar <sattardiq@gmail.com> To: wajihah7@yahoo.com Sent: Tue, November 17, 2009 9:23:57 AM My output is like abwbasit2002@yahoo.com ----- // notice '-----' at the end, I need to omit that. sattardiq@gmail.com wajihah7@yahoo.com Sent //notice 'Sent' at the end, I need to omit that. //Dont know how to modify my code more to remove those
  21. I need to split the paragraph based on many signs, also based on whenever space is encountered. $emails = split('[<>;:,\/"{}*!?]',$para); //split based on various signs also need to include SPACE...how? Help me split on space also..
  22. simple emails to be entered in db table user1@site.com user2@site2.co.in user3@xx.nz ...
×
×
  • 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.