Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2007
    Messaggi
    95

    [PHP]grosso problema invio email

    salve ragazzi...
    stò per impazzire...
    nel mio sito stò sistemando il servizio delle newsletter e voglio che quando uno nuovo si iscrive gli venga recapitata una email.
    come posso fare per far sì che questa email non venga considerata spam???
    questo è un problema per me in quanto se provo ad autoinviarmi una email su hotmail l'email mi viene respinta...

    il testo dell'email di risposta dice:

    This is the mail system at host estia.helloweb.eu.

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    <xxxxxxxx@hotmail.it>: host mx4.hotmail.com[65.54.244.232] said: 550
    SC-001 Mail rejected by Windows Live Hotmail for policy reasons. Reasons
    for rejection may be related to content with spam-like characteristics or
    IP/domain reputation problems. If you are not an email/network admin please
    contact your E-mail/Internet Service Provider for help. Email/network
    admins, please visit http://postmaster.live.com for email delivery
    information and support (in reply to MAIL FROM command)
    Reporting-MTA: dns; estia.helloweb.eu
    X-Postfix-Queue-ID: 4D5BDFEB72
    Arrival-Date: Thu, 13 Dec 2007 17:04:48 +0100 (CET)

    Final-Recipient: rfc822; xxxxxxxx@hotmail.it
    Original-Recipient: rfc822;xxxxxxxx@hotmail.it
    Action: failed
    Status: 5.0.0
    Remote-MTA: dns; mx4.hotmail.com
    Diagnostic-Code: smtp; 550 SC-001 Mail rejected by Windows Live Hotmail for
    policy reasons. Reasons for rejection may be related to content with
    spam-like characteristics or IP/domain reputation problems. If you are not
    an email/network admin please contact your E-mail/Internet Service Provider
    for help. Email/network admins, please visit http://postmaster.live.com for
    email delivery information and support

    ps: per invio uso la funzione mail()

  2. #2
    Utente di HTML.it L'avatar di alpeweb
    Registrato dal
    Oct 2002
    Messaggi
    1,691
    posta gli header che usi nella mail.
    ...altri 5 anni di purga...

  3. #3
    Utente di HTML.it
    Registrato dal
    Jul 2007
    Messaggi
    95
    Questa sono le due funzioni che ho creato per inviare l'email
    Codice PHP:
    function inviaEmailNuovoIscrittoNewsletter($destinatario){
        
    $boundary  "==========================================";
            
        
    $header "From: mittente <email_mittente>\n";
        
    $header .= "MIME-Version: 1.0\n";
            
        
    $header .= "Content-Type: multipart/related;\n";
        
    $header .= " boundary=\"$boundary\";\n\n";
        
    $header .= " type=\"multipart/mixed\";\n";
            
        
    $messaggio .= "--$boundary\n";
        
    $messaggio .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
        
    $messaggio .= "Content-Transfer-Encoding: 7bit\n\n";
        
    $messaggio .= "<html>\n";
        
    $messaggio .= "        <head>\n";
        
    $messaggio .= "            <style type=\"text/css\">\n";
        
    $messaggio .= "                blablabla\n";
        
    $messaggio .= "            </style>\n";
        
    $messaggio .= "        </head>\n";
        
    $messaggio .= "        <body bgcolor=\"white\">\n";
        
    $messaggio .= "            messaggio di prova\n";
        
    $messaggio .= "            <img src=\"cid:img1\">\n";
        
    $messaggio .= "            <img src=\"cid:img2\">\n";
        
    $messaggio .= "        </body>\n";
        
    $messaggio .= "</html>\n";
            
        
    $messaggio .= "--$boundary\n";
        
    $messaggio .= allega('img1',$boundary);
        
    $messaggio .= allega('img2',$boundary);

        
    mail($destinatario,'Ti sei iscritto',$messaggio,$header);

    Codice PHP:
    function allega($nome,$boundary){
        
    $messaggio "Content-Type: image/gif\n";        
        
    $messaggio .= "Content-ID: <$nome>\n";
        
    $messaggio .= "Content-Transfer-Encoding: base64\n\n";
            
        
    $allegato "../img/$nome.gif";
        
    $file fopen($allegato,'rb');
        
    $data fread($file,filesize($allegato));
        
    fclose($file);        
        
    $data chunk_split(base64_encode($data));
            
        
    $messaggio .= "$data\n";
        
    $messaggio .= "--$boundary\n";
        
        return 
    $messaggio;


  4. #4
    Utente di HTML.it L'avatar di alpeweb
    Registrato dal
    Oct 2002
    Messaggi
    1,691
    $header = "From: mittente <email_mittente>\n"; questo deve esistere realmente
    se hai solo html è facile che venga considerato spam

    Aggiungi il formato text/plain metti un indirizzo che esiste realmente
    imposta il reply e riprova se succede ancora bisogna analizzare l'intestazione
    leggendola da una mail recapitata.
    ...altri 5 anni di purga...

  5. #5
    Utente di HTML.it
    Registrato dal
    Jul 2007
    Messaggi
    95
    problema risolto con PHPMailer
    però non mi prende il css interno!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.