Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.php > #3289 > unrolled thread

how to cath mail error

Started byJakub <jak74@interia.pl>
First post2022-05-30 14:06 +0100
Last post2022-05-30 15:45 +0200
Articles 2 — 2 participants

Back to article view | Back to alt.php


Contents

  how to cath mail error Jakub <jak74@interia.pl> - 2022-05-30 14:06 +0100
    Re: how to cath mail error "J.O. Aho" <user@example.net> - 2022-05-30 15:45 +0200

#3289 — how to cath mail error

FromJakub <jak74@interia.pl>
Date2022-05-30 14:06 +0100
Subjecthow to cath mail error
Message-ID<6294c153$0$463$65785112@news.neostrada.pl>
I have this code to sand email:


function sendEmail($to,  $title,  &$text) {
     $from = 'jakub@jakubowo.net';
     $subject = $title;

     $w = '<html><head><meta http-equiv="content-type" 
content="text/xhtml; charset=utf-8"></head>
            <body 
style="background-color:#ffffff;color:#000000;margin-top:30px;margin-left:30px;padding:10px;"><hr><br>'
           . $text . '<hr><br><p><a href="mailto:'
             . $from . '">' . $from . '</a></p></body></html>';

     $he = 'MIME-Version: 1.0' . PHP_EOL . 'Content-type: text/html; 
charset=utf-8 ' . PHP_EOL
               . 'From: admin Search. <' . $from . '>' . PHP_EOL
               . 'Content-Transfer-Encoding: base64' . PHP_EOL;

     $w = chunk_split(base64_encode($w));
     imap_mail($to, $subject, $w, $he);
   }


how to catch this error

Warning: imap_mail(): Failed to connect to mailserver at "localhost" 
port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use 
ini_set()

thank for answers

Jakub

[toc] | [next] | [standalone]


#3290

From"J.O. Aho" <user@example.net>
Date2022-05-30 15:45 +0200
Message-ID<jfk03cFtbjuU2@mid.individual.net>
In reply to#3289
On 30/05/2022 15.06, Jakub wrote:
> I have this code to sand email:

If you have to ask the same question in multiple newsgroups, crosspost 
and do not set a follow up, as not all subscribes all the newsgroups and 
then they would miss parts of the thread.

If your newsgroup provide don't allow you to crosspost, then just post 
to one newsgroup.

-- 

  //Aho

[toc] | [prev] | [standalone]


Back to top | Article view | alt.php


csiph-web