0
 $config = [
        'mailtype' => 'html',
        'charset' => 'utf-8',
        'protocol' => 'smtp',
        'smtp_host' => 'ssl://mail.xxxxx.it',
        'smtp_user' => 'notification@xxxxx.it',
        'smtp_pass' => 'sudwwualwor',
        'smtp_crypto' => 'ssl',
        'smtp_port' => '465',
        'crlf' => "\r\n",
        'newline' => "\r\n"
    ]; 

i have setting up my smtp using php. but when i try this setting on my local xampp i got error like this

"fsockopen(): php_network_getaddresses: getaddrInfo failed Not such host know"

if i ping my smtp_host i can get result success. i have question how to fix this issue ? on my server i use cpanel. but on my local i use xampp

brombeer
  • 8,716
  • 5
  • 21
  • 27
FAI
  • 11
  • 6
  • 1
    https://stackoverflow.com/questions/32677350/how-to-send-smtp-mail-from-localhost – Alive to die - Anant Jul 17 '23 at 06:52
  • 2
    `ssl://mail.xxxxx.it` - that is not a host name. The host name portion of that address is only `mail.xxxxx.it` – CBroe Jul 17 '23 at 07:16
  • $config = [ 'mailtype' => 'html', 'charset' => 'utf-8', 'protocol' => 'smtp', 'smtp_host' => 'mail.xxxxx.it', 'smtp_user' => 'notification@xxxxx.it', 'smtp_pass' => 'sudwwualwor', 'smtp_crypto' => 'ssl', 'smtp_port' => '465', 'crlf' => "\r\n", 'newline' => "\r\n" ]; i have tried use this. i cannot found error but i cannot get email – FAI Jul 18 '23 at 02:06

0 Answers0