473,769 Members | 5,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail(): SMTP server response: 530 5.7.3 Client was not authenticated

254 Contributor
Hi I am no able to send mail and it is giving this error
Warning: mail(): SMTP server response: 530 5.7.3 Client was not authenticated in c:\inetpub\wwwr oot\eshop\inclu des\classes\ema il.php on line 522

and the code is:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. /*
  4.   $Id: email.php,v 1.12 2003/06/17 17:29:44 dgw_ Exp $
  5.  
  6.   osCommerce, Open Source E-Commerce Solutions
  7.   http://www.oscommerce.com
  8.  
  9.   Copyright (c) 2003 osCommerce
  10.  
  11.   Released under the GNU General Public License
  12.  
  13.   mail.php - a class to assist in building mime-HTML eMails
  14.  
  15.   The original class was made by Richard Heyes <richard@phpguru.org>
  16.   and can be found here: http://www.phpguru.org
  17.  
  18.   Renamed and Modified by Jan Wildeboer for osCommerce
  19. */
  20.  
  21.   class email {
  22.     var $html;
  23.     var $text;
  24.     var $output;
  25.     var $html_text;
  26.     var $html_images;
  27.     var $image_types;
  28.     var $build_params;
  29.     var $attachments;
  30.     var $headers;
  31.  
  32.     function email($headers = '') {
  33.       if ($headers == '') $headers = array();
  34.  
  35.       $this->html_images = array();
  36.       $this->headers = array();
  37.  
  38.       if (EMAIL_LINEFEED == 'CRLF') {
  39.         $this->lf = "\r\n";
  40.       } else {
  41.         $this->lf = "\n";
  42.       }
  43.  
  44. /**
  45.  * If you want the auto load functionality
  46.  * to find other mime-image/file types, add the
  47.  * extension and content type here.
  48.  */
  49.  
  50.       $this->image_types = array('gif' => 'image/gif',
  51.                                  'jpg' => 'image/jpeg',
  52.                                  'jpeg' => 'image/jpeg',
  53.                                  'jpe' => 'image/jpeg',
  54.                                  'bmp' => 'image/bmp',
  55.                                  'png' => 'image/png',
  56.                                  'tif' => 'image/tiff',
  57.                                  'tiff' => 'image/tiff',
  58.                                  'swf' => 'application/x-shockwave-flash');
  59.  
  60.       $this->build_params['html_encoding'] = 'quoted-printable';
  61.       $this->build_params['text_encoding'] = '7bit';
  62.       $this->build_params['html_charset'] = constant('CHARSET');
  63.       $this->build_params['text_charset'] = constant('CHARSET');
  64.       $this->build_params['text_wrap'] = 998;
  65.  
  66. /**
  67.  * Make sure the MIME version header is first.
  68.  */
  69.  
  70.       $this->headers[] = 'MIME-Version: 1.0';
  71.  
  72.       reset($headers);
  73.       while (list(,$value) = each($headers)) {
  74.         if (tep_not_null($value)) {
  75.           $this->headers[] = $value;
  76.         }
  77.       }
  78.     }
  79.  
  80. /**
  81.  * This function will read a file in
  82.  * from a supplied filename and return
  83.  * it. This can then be given as the first
  84.  * argument of the the functions
  85.  * add_html_image() or add_attachment().
  86.  */
  87.  
  88.     function get_file($filename) {
  89.       $return = '';
  90.  
  91.       if ($fp = fopen($filename, 'rb')) {
  92.         while (!feof($fp)) {
  93.           $return .= fread($fp, 1024);
  94.         }
  95.         fclose($fp);
  96.  
  97.         return $return;
  98.       } else {
  99.         return false;
  100.       }
  101.     }
  102.  
  103. /**
  104.  * Function for extracting images from
  105.  * html source. This function will look
  106.  * through the html code supplied by add_html()
  107.  * and find any file that ends in one of the
  108.  * extensions defined in $obj->image_types.
  109.  * If the file exists it will read it in and
  110.  * embed it, (not an attachment).
  111.  *
  112.  * Function contributed by Dan Allen
  113.  */
  114.  
  115.     function find_html_images($images_dir) {
  116. // Build the list of image extensions
  117.       while (list($key, ) = each($this->image_types)) {
  118.         $extensions[] = $key;
  119.       }
  120.  
  121.       preg_match_all('/"([^"]+\.(' . implode('|', $extensions).'))"/Ui', $this->html, $images);
  122.  
  123.       for ($i=0; $i<count($images[1]); $i++) {
  124.         if (file_exists($images_dir . $images[1][$i])) {
  125.           $html_images[] = $images[1][$i];
  126.           $this->html = str_replace($images[1][$i], basename($images[1][$i]), $this->html);
  127.         }
  128.       }
  129.  
  130.       if (tep_not_null($html_images)) {
  131. // If duplicate images are embedded, they may show up as attachments, so remove them.
  132.         $html_images = array_unique($html_images);
  133.         sort($html_images);
  134.  
  135.         for ($i=0; $i<count($html_images); $i++) {
  136.           if ($image = $this->get_file($images_dir . $html_images[$i])) {
  137.             $content_type = $this->image_types[substr($html_images[$i], strrpos($html_images[$i], '.') + 1)];
  138.             $this->add_html_image($image, basename($html_images[$i]), $content_type);
  139.           }
  140.         }
  141.       }
  142.     }
  143.  
  144. /**
  145.  * Adds plain text. Use this function
  146.  * when NOT sending html email
  147.  */
  148.  
  149.     function add_text($text = '') {
  150.       $this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
  151.     }
  152.  
  153. /**
  154.  * Adds a html part to the mail.
  155.  * Also replaces image names with
  156.  * content-id's.
  157.  */
  158.  
  159.     function add_html($html, $text = NULL, $images_dir = NULL) {
  160.       $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html);
  161.       $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);
  162.  
  163.       if (isset($images_dir)) $this->find_html_images($images_dir);
  164.     }
  165.  
  166. /**
  167.  * Adds an image to the list of embedded
  168.  * images.
  169.  */
  170.  
  171.     function add_html_image($file, $name = '', $c_type='application/octet-stream') {
  172.       $this->html_images[] = array('body' => $file,
  173.                                    'name' => $name,
  174.                                    'c_type' => $c_type,
  175.                                    'cid' => md5(uniqid(time())));
  176.     }
  177.  
  178. /**
  179.  * Adds a file to the list of attachments.
  180.  */
  181.  
  182.     function add_attachment($file, $name = '', $c_type='application/octet-stream', $encoding = 'base64') {
  183.       $this->attachments[] = array('body' => $file,
  184.                                    'name' => $name,
  185.                                    'c_type' => $c_type,
  186.                                    'encoding' => $encoding);
  187.     }
  188.  
  189. /**
  190.  * Adds a text subpart to a mime_part object
  191.  */
  192.  
  193. /* HPDL PHP3 */
  194. //    function &add_text_part(&$obj, $text) {
  195.     function add_text_part(&$obj, $text) {
  196.       $params['content_type'] = 'text/plain';
  197.       $params['encoding'] = $this->build_params['text_encoding'];
  198.       $params['charset'] = $this->build_params['text_charset'];
  199.  
  200.       if (is_object($obj)) {
  201.         return $obj->addSubpart($text, $params);
  202.       } else {
  203.         return new mime($text, $params);
  204.       }
  205.     }
  206.  
  207. /**
  208.  * Adds a html subpart to a mime_part object
  209.  */
  210.  
  211. /* HPDL PHP3 */
  212. //    function &add_html_part(&$obj) {
  213.     function add_html_part(&$obj) {
  214.       $params['content_type'] = 'text/html';
  215.       $params['encoding'] = $this->build_params['html_encoding'];
  216.       $params['charset'] = $this->build_params['html_charset'];
  217.  
  218.       if (is_object($obj)) {
  219.         return $obj->addSubpart($this->html, $params);
  220.       } else {
  221.         return new mime($this->html, $params);
  222.       }
  223.     }
  224.  
  225. /**
  226.  * Starts a message with a mixed part
  227.  */
  228.  
  229. /* HPDL PHP3 */
  230. //    function &add_mixed_part() {
  231.     function add_mixed_part() {
  232.       $params['content_type'] = 'multipart/mixed';
  233.  
  234.       return new mime('', $params);
  235.     }
  236.  
  237. /**
  238.  * Adds an alternative part to a mime_part object
  239.  */
  240.  
  241. /* HPDL PHP3 */
  242. //    function &add_alternative_part(&$obj) {
  243.     function add_alternative_part(&$obj) {
  244.       $params['content_type'] = 'multipart/alternative';
  245.  
  246.       if (is_object($obj)) {
  247.         return $obj->addSubpart('', $params);
  248.       } else {
  249.         return new mime('', $params);
  250.       }
  251.     }
  252.  
  253. /**
  254.  * Adds a html subpart to a mime_part object
  255.  */
  256.  
  257. /* HPDL PHP3 */
  258. //    function &add_related_part(&$obj) {
  259.     function add_related_part(&$obj) {
  260.       $params['content_type'] = 'multipart/related';
  261.  
  262.       if (is_object($obj)) {
  263.         return $obj->addSubpart('', $params);
  264.       } else {
  265.         return new mime('', $params);
  266.       }
  267.     }
  268.  
  269. /**
  270.  * Adds an html image subpart to a mime_part object
  271.  */
  272.  
  273. /* HPDL PHP3 */
  274. //    function &add_html_image_part(&$obj, $value) {
  275.     function add_html_image_part(&$obj, $value) {
  276.       $params['content_type'] = $value['c_type'];
  277.       $params['encoding'] = 'base64';
  278.       $params['disposition'] = 'inline';
  279.       $params['dfilename'] = $value['name'];
  280.       $params['cid'] = $value['cid'];
  281.  
  282.       $obj->addSubpart($value['body'], $params);
  283.     }
  284.  
  285. /**
  286.  * Adds an attachment subpart to a mime_part object
  287.  */
  288.  
  289. /* HPDL PHP3 */
  290. //    function &add_attachment_part(&$obj, $value) {
  291.     function add_attachment_part(&$obj, $value) {
  292.       $params['content_type'] = $value['c_type'];
  293.       $params['encoding'] = $value['encoding'];
  294.       $params['disposition'] = 'attachment';
  295.       $params['dfilename'] = $value['name'];
  296.  
  297.       $obj->addSubpart($value['body'], $params);
  298.     }
  299.  
  300. /**
  301.  * Builds the multipart message from the
  302.  * list ($this->_parts). $params is an
  303.  * array of parameters that shape the building
  304.  * of the message. Currently supported are:
  305.  *
  306.  * $params['html_encoding'] - The type of encoding to use on html. Valid options are
  307.  *                            "7bit", "quoted-printable" or "base64" (all without quotes).
  308.  *                            7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable
  309.  * $params['text_encoding'] - The type of encoding to use on plain text Valid options are
  310.  *                            "7bit", "quoted-printable" or "base64" (all without quotes).
  311.  *                            Default is 7bit
  312.  * $params['text_wrap']     - The character count at which to wrap 7bit encoded data.
  313.  *                            Default this is 998.
  314.  * $params['html_charset']  - The character set to use for a html section.
  315.  *                            Default is iso-8859-1
  316.  * $params['text_charset']  - The character set to use for a text section.
  317.  *                          - Default is iso-8859-1
  318.  */
  319.  
  320. /* HPDL PHP3 */
  321. //    function build_message($params = array()) {
  322.     function build_message($params = '') {
  323.       if ($params == '') $params = array();
  324.  
  325.       if (count($params) > 0) {
  326.         reset($params);
  327.         while(list($key, $value) = each($params)) {
  328.           $this->build_params[$key] = $value;
  329.         }
  330.       }
  331.  
  332.       if (tep_not_null($this->html_images)) {
  333.         reset($this->html_images);
  334.         while (list(,$value) = each($this->html_images)) {
  335.           $this->html = str_replace($value['name'], 'cid:' . $value['cid'], $this->html);
  336.         }
  337.       }
  338.  
  339.       $null = NULL;
  340.       $attachments = ((tep_not_null($this->attachments)) ? true : false);
  341.       $html_images = ((tep_not_null($this->html_images)) ? true : false);
  342.       $html = ((tep_not_null($this->html)) ? true : false);
  343.       $text = ((tep_not_null($this->text)) ? true : false);
  344.  
  345.       switch (true) {
  346.         case (($text == true) && ($attachments == false)):
  347. /* HPDL PHP3 */
  348. //          $message =& $this->add_text_part($null, $this->text);
  349.           $message = $this->add_text_part($null, $this->text);
  350.           break;
  351.         case (($text == false) && ($attachments == true) && ($html == false)):
  352. /* HPDL PHP3 */
  353. //          $message =& $this->add_mixed_part();
  354.           $message = $this->add_mixed_part();
  355.  
  356.           for ($i=0; $i<count($this->attachments); $i++) {
  357.             $this->add_attachment_part($message, $this->attachments[$i]);
  358.           }
  359.           break;
  360.         case (($text == true) && ($attachments == true)):
  361. /* HPDL PHP3 */
  362. //          $message =& $this->add_mixed_part();
  363.           $message = $this->add_mixed_part();
  364.           $this->add_text_part($message, $this->text);
  365.  
  366.           for ($i=0; $i<count($this->attachments); $i++) {
  367.             $this->add_attachment_part($message, $this->attachments[$i]);
  368.           }
  369.           break;
  370.         case (($html == true) && ($attachments == false) && ($html_images == false)):
  371.           if (tep_not_null($this->html_text)) {
  372. /* HPDL PHP3 */
  373. //            $message =& $this->add_alternative_part($null);
  374.             $message = $this->add_alternative_part($null);
  375.             $this->add_text_part($message, $this->html_text);
  376.             $this->add_html_part($message);
  377.           } else {
  378. /* HPDL PHP3 */
  379. //            $message =& $this->add_html_part($null);
  380.             $message = $this->add_html_part($null);
  381.           }
  382.           break;
  383.         case (($html == true) && ($attachments == false) && ($html_images == true)):
  384.           if (tep_not_null($this->html_text)) {
  385. /* HPDL PHP3 */
  386. //            $message =& $this->add_alternative_part($null);
  387.             $message = $this->add_alternative_part($null);
  388.             $this->add_text_part($message, $this->html_text);
  389. /* HPDL PHP3 */
  390. //            $related =& $this->add_related_part($message);
  391.             $related = $this->add_related_part($message);
  392.           } else {
  393. /* HPDL PHP3 */
  394. //            $message =& $this->add_related_part($null);
  395. //            $related =& $message;
  396.             $message = $this->add_related_part($null);
  397.             $related = $message;
  398.           }
  399.           $this->add_html_part($related);
  400.  
  401.           for ($i=0; $i<count($this->html_images); $i++) {
  402.             $this->add_html_image_part($related, $this->html_images[$i]);
  403.           }
  404.           break;
  405.         case (($html == true) && ($attachments == true) && ($html_images == false)):
  406. /* HPDL PHP3 */
  407. //          $message =& $this->add_mixed_part();
  408.           $message = $this->add_mixed_part();
  409.           if (tep_not_null($this->html_text)) {
  410. /* HPDL PHP3 */
  411. //            $alt =& $this->add_alternative_part($message);
  412.             $alt = $this->add_alternative_part($message);
  413.             $this->add_text_part($alt, $this->html_text);
  414.             $this->add_html_part($alt);
  415.           } else {
  416.             $this->add_html_part($message);
  417.           }
  418.  
  419.           for ($i=0; $i<count($this->attachments); $i++) {
  420.             $this->add_attachment_part($message, $this->attachments[$i]);
  421.           }
  422.           break;
  423.         case (($html == true) && ($attachments == true) && ($html_images == true)):
  424. /* HPDL PHP3 */
  425. //          $message =& $this->add_mixed_part();
  426.           $message = $this->add_mixed_part();
  427.  
  428.           if (tep_not_null($this->html_text)) {
  429. /* HPDL PHP3 */
  430. //            $alt =& $this->add_alternative_part($message);
  431.             $alt = $this->add_alternative_part($message);
  432.             $this->add_text_part($alt, $this->html_text);
  433. /* HPDL PHP3 */
  434. //            $rel =& $this->add_related_part($alt);
  435.             $rel = $this->add_related_part($alt);
  436.           } else {
  437. /* HPDL PHP3 */
  438. //            $rel =& $this->add_related_part($message);
  439.             $rel = $this->add_related_part($message);
  440.           }
  441.           $this->add_html_part($rel);
  442.  
  443.           for ($i=0; $i<count($this->html_images); $i++) {
  444.             $this->add_html_image_part($rel, $this->html_images[$i]);
  445.           }
  446.  
  447.           for ($i=0; $i<count($this->attachments); $i++) {
  448.             $this->add_attachment_part($message, $this->attachments[$i]);
  449.           }
  450.           break;
  451.       }
  452.  
  453.       if ( (isset($message)) && (is_object($message)) ) {
  454.         $output = $message->encode();
  455.         $this->output = $output['body'];
  456.  
  457.         reset($output['headers']);
  458.         while (list($key, $value) = each($output['headers'])) {
  459.           $headers[] = $key . ': ' . $value;
  460.         }
  461.  
  462.         $this->headers = array_merge($this->headers, $headers);
  463.  
  464.         return true;
  465.       } else {
  466.         return false;
  467.       }
  468.     }
  469.  
  470. /**
  471.  * Sends the mail.
  472.  */
  473.  
  474.     function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {
  475.       if ((strstr($to_name, "\n") != false) || (strstr($to_name, "\r") != false)) {
  476.         return false;
  477.       }
  478.  
  479.       if ((strstr($to_addr, "\n") != false) || (strstr($to_addr, "\r") != false)) {
  480.         return false;
  481.       }
  482.  
  483.       if ((strstr($subject, "\n") != false) || (strstr($subject, "\r") != false)) {
  484.         return false;
  485.       }
  486.  
  487.       if ((strstr($from_name, "\n") != false) || (strstr($from_name, "\r") != false)) {
  488.         return false;
  489.       }
  490.  
  491.       if ((strstr($from_addr, "\n") != false) || (strstr($from_addr, "\r") != false)) {
  492.         return false;
  493.       }
  494.  
  495.       $to = (($to_name != '') ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr);
  496.       $from = (($from_name != '') ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr);
  497.  
  498.       if (is_string($headers)) {
  499.         $headers = explode($this->lf, trim($headers));
  500.       }
  501.  
  502.       for ($i=0; $i<count($headers); $i++) {
  503.         if (is_array($headers[$i])) {
  504.           for ($j=0; $j<count($headers[$i]); $j++) {
  505.             if ($headers[$i][$j] != '') {
  506.               $xtra_headers[] = $headers[$i][$j];
  507.             }
  508.           }
  509.         }
  510.  
  511.         if ($headers[$i] != '') {
  512.           $xtra_headers[] = $headers[$i];
  513.         }
  514.       }
  515.  
  516.       if (!isset($xtra_headers)) {
  517.         $xtra_headers = array();
  518.       }
  519.  
  520.       if (EMAIL_TRANSPORT == 'smtp') {
  521.         return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
  522.       } else {
  523.         return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));
  524.       }
  525.     }
  526.  
  527. /**
  528.  * Use this method to return the email
  529.  * in message/rfc822 format. Useful for
  530.  * adding an email to another email as
  531.  * an attachment. there's a commented
  532.  * out example in example.php.
  533.  *
  534.  * string get_rfc822(string To name,
  535.  *       string To email,
  536.  *       string From name,
  537.  *       string From email,
  538.  *       [string Subject,
  539.  *        string Extra headers])
  540.  */
  541.  
  542.     function get_rfc822($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {
  543. // Make up the date header as according to RFC822
  544.       $date = 'Date: ' . date('D, d M y H:i:s');
  545.       $to = (($to_name != '') ? 'To: "' . $to_name . '" <' . $to_addr . '>' : 'To: ' . $to_addr);
  546.       $from = (($from_name != '') ? 'From: "' . $from_name . '" <' . $from_addr . '>' : 'From: ' . $from_addr);
  547.  
  548.       if (is_string($subject)) {
  549.         $subject = 'Subject: ' . $subject;
  550.       }
  551.  
  552.       if (is_string($headers)) {
  553.         $headers = explode($this->lf, trim($headers));
  554.       }
  555.  
  556.       for ($i=0; $i<count($headers); $i++) {
  557.         if (is_array($headers[$i])) {
  558.           for ($j=0; $j<count($headers[$i]); $j++) {
  559.             if ($headers[$i][$j] != '') {
  560.               $xtra_headers[] = $headers[$i][$j];
  561.             }
  562.           }
  563.         }
  564.  
  565.         if ($headers[$i] != '') {
  566.           $xtra_headers[] = $headers[$i];
  567.         }
  568.       }
  569.  
  570.       if (!isset($xtra_headers)) {
  571.         $xtra_headers = array();
  572.       }
  573.  
  574.       $headers = array_merge($this->headers, $xtra_headers);
  575.  
  576.       return $date . $this->lf . $from . $this->lf . $to . $this->lf . $subject . $this->lf . implode($this->lf, $headers) . $this->lf . $this->lf . $this->output;
  577.     }
  578.   }
  579. ?>
  580.  
Please suggest me what I should do I tried to change in php.ini file
sendmail_from = you@yourdomain to
sendmail_from = <email removed>

but still getting the same error. Do I need to change the SMTP= localhost also if yes then what. My script is running on Window Server.

Thanks!
Jan 30 '09 #1
7 16922
dlite922
1,584 Recognized Expert Top Contributor
localhost (the computer running PHP) must have mailserver.

It looks like it does in your case but it requires authentication.

if you can telnet localhost on 25 and successfully send mail, then attempt to use PHP.

the PHP standard mail() function does not support authentication. Try the PHP Mailer() class. (Downloadable from a quick google search)


Good luck




Dan
Feb 1 '09 #2
mukeshrasm
254 Contributor
@dlite922
Hi! Thanks, I downloaded the phpMailer and I am able to send mail using my server but when i am using window server it is giving error

[error]
Parse error: parse error, expecting `T_OLD_FUNCTION ' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\inetpub\wwwr oot\phpmailer\c lass.phpmailer. php on line 45
[/error]and in class.phpmailer .php, at line 45, variable is defined

Expand|Select|Wrap|Line Numbers
  1.  public $Priority          = 3;// priority (1 = High, 3 = Normal, 5 = low).
  2.  
and the page which i am using to send mail is smtpmailsend.ph p and this is code

Expand|Select|Wrap|Line Numbers
  1. <?php  
  2. require("class.phpmailer.php");  
  3.  $mail = new PHPMailer();  
  4. $mail->IsSMTP();  // telling the class to use SMTP  
  5. $mail->Host     = "www.example.com"; // SMTP server. I provided the name of the host where this file is uploaded
  6.  
  7.  $mail->From     = "example@example.com";  
  8.  $mail->FromName = "example";
  9. $mail->AddAddress("example@example.com"); 
  10.  
  11. $mail->Subject  = "First PHPMailer Message";  
  12.  $mail->Body     = "Hi! \n\n This is my first e-mail sent through PHPMailer.";  
  13.  $mail->WordWrap = 50;  
  14.  
  15.  if(!$mail->Send()) {  
  16.    echo 'Message was not sent.';  
  17.    echo 'Mailer error: ' . $mail->ErrorInfo;  
  18.  } else {  
  19.    echo 'Message has been sent.';  
  20. }  
  21.  ?> 
  22.  
Now! where I am making mistake or what will be the solution of it.

thanks
Feb 2 '09 #3
Markus
6,050 Recognized Expert Expert
Sounds like your Windows server is running PHP 4.x The public, protected and private keywords are only available from PHP 5 onwards. Although, the swiftmailer website does suggest it will work with PHP 4
Feb 2 '09 #4
Dormilich
8,658 Recognized Expert Moderator Expert
@Markus: Swift Mailer is the other mail class. here PHPMailer is used (Swift Mailer Code is different....)
Feb 2 '09 #5
Markus
6,050 Recognized Expert Expert
Oh, in that case: move to Swift Mailer. PHPMailer isn't being developed anymore and has barely any support. My original answer stands: you're running PHP 4, where PHPMailer wants PHP 5.
Feb 2 '09 #6
mukeshrasm
254 Contributor
@Markus
Hi! Thanks, should I upgrade it to PHP5 or I can write some .htaccess file where I can configure the setting and then upload it to root will it work or what should I should apart from using Swift Mailer.
Feb 3 '09 #7
Markus
6,050 Recognized Expert Expert
@mukeshrasm
Upgrade to PHP 5. There's no point in using old versions; it's out of development and no security updates will be released.
Feb 3 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1448
by: John J. Hughes II | last post by:
First of all does anyone know if the e-mail client in beta 2 works with SSL and or what I did wrong below? Changing to the correct user name and password works with outlook. try { System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage("myName@gmail.com", "myName@gmail.com"); mm.Subject = "V2.0 test"; mm.BodyEncoding = Encoding.ASCII;
4
2595
by: z f | last post by:
Hi, i'm sending mail from the aspx page on the server. it is running on hosting, so i configure the System.Web.Mail.SmtpMail.SmtpServer property to my mail server. but problem is that sender email is also configurable and since the sender email is not from the SMTP server same host, it is not allows to send. i need to ba able to configure the SMTP Auth to be authenticated to different user from the sender email, but i didn't find...
3
3036
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it identifies itself as the computer name which is not in domain.com format, triggering spam filter problems). Instead, I want to have my code send through an SMTP server of a company that we pay for mail service. But they require a username and password....
34
18270
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
1
1937
by: danyadler | last post by:
Hi everyone, I've found this code that can send SMTP commands via sockets (25). The problem is when I send the command: "rcpt to:whatever@yahoo.com", I get a server response: "503 This mail server requires authentication ....". Is there a way to create this authentication, to make this happen? Thanks in advance, Danny
0
1553
by: Neo Geshel | last post by:
I am experiencing an inconsistency with System.Net.Mail. I have a web form on a site. The form gets filled, and one copy gets sent to the recipient (info@domain.com). This works just fine. However, I want a summarized e-mail (with slightly different content) to get sent to the sender, and this fails unless the “sender”has their domain name on the same server. Essentially, it has the following problem:
1
14359
by: Jeff | last post by:
I am receiving the following error: // error: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 No AUTH command has been given. How do I provide the Client Authentication with the code below. private void SendEmail2()
2
1824
by: =?Utf-8?B?QWJlUg==?= | last post by:
Okay I have a really weird issue. I'm not sure where to post this, but since it's a .NET app I'll try posting it here first. I've written a standard windows forms app to generate emails to a distribution group. Code is clean. The smtp server is using the default port 25, and I'm providing credentials object to the smptclient class. When I try to use the app from my client's smtp server I get the following exception "There was an error in...
14
8363
by: Warren Tang | last post by:
Hi I am using the mail function to send a mail like this: $b = mail("my_real_email_address@gmail.com", "Hello from PHP", "Hi, finally sent an email successfully"); But it failed. Could you guide me to get it work? Regards
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.