Visualizzazione dei risultati da 1 a 10 su 10

Discussione: mail server

  1. #1
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    mail server

    ciao,
    ho installato un mailserver locale e ho creato un profilo (user, password e server)
    ora come faccio a usarli nel codice php?
    quale funzione mi permette di farlo?
    io uso

    ini_set('SMTP',$server_posta);

    per settare il server..e per l'user e la pwd?

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  2. #2
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    che io sappia devi modificare il file php.ini, ma forse si può anche con ini_set...

    ciao

  3. #3
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    ...

    si ma quali campi del php.ini devo modificare? alla voce mail function c'è solo SMTP server...non c'è traccia del campo user e password..!!!

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  4. #4
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    ma l'smtp server richiede autenticazione?

  5. #5
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    ...

    si, come errore mi da:


    Warning: mail(): SMTP server response: 553 Authentication is required. in news_04_engine_send.php on line 48


    la linea 48 è dove ho la funzione mail();

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  6. #6
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    secondo me in primo luogo dovresti configurare l'smtp server per evitare di chiedere autenticazione dalla rete locale (se sei nella stessa rete).

    Altrimenti googlando ho trovato questo :

    http://phpmailer.sourceforge.net/


  7. #7
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    thanks

    grazie!
    ma non ci sarebbe il modo di configurare il server dal php.ini?
    ci deve essere un modo senza cambiare server smtp!
    il più è trovarlo...

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  8. #8
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    ...

    up

    nessuno sa come risolvere senza cambiare server smtp?

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  9. #9
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    credo che verrò additato come il rompiscatole che consiglia di leggere le guide, ma la verità è che tutto ciò che ci serve è a portata di mano.

    Sul sito di php.net sono arrivato a questa pagina:

    http://fr.php.net/manual/it/ref.mail.php#ini.smtp

    e leggendo tra i commenti degli utenti c'è questo:

    Metin Savignano <ms201 at zipfly dot de>
    04-Feb-2005 02:32
    If you want to use the mail() function under *nix and Windows alike, I recommend using the little fake sendmail utility available under http://glob.com.au/sendmail/ (bsd license).

    I tried it and it works great for me. I can use the very same PHP code on both the Linux server as well as my Windows test machine. It supports auth smtp.

    Instructions: Download fake sendmail, unzip it into a directory of your choice, customize the sendmail.ini to your smtp server, set the sendmail path in your php.ini, and you're done.
    spero ti possa essere utile..

    ciao

  10. #10
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    ...

    grazie davvero..guarda, non è che non apprezzi il tuo aiuto, solo che se ho un problema preferisco tentare di risolverlo piuttosto che scavalcarlo cambiando programma smtp...! ho provato a fare ricerche con google e su tutti i siti di php che conosco ma non ho trovato niente sull'argomento, l'unica cosa che ho trovato è:

    codice:
    <?
    include("Mail.php");
    
    $recipients = "mail_to@domain.mail";
    
    $headers["From"]    = "mail_from@domain.mail";
    $headers["To"]      = "mail_to@domain.mail";
    $headers["Subject"] = "Test message";
    
    $body = "TEST MESSAGE!!!";
    
    $params["host"] = "smtp.server";
    $params["port"] = "25";
    $params["auth"] = true;
    $params["username"] = "user";
    $params["password"] = "password";
    
    // Create the mail object using the Mail::factory method
    $mail_object =& Mail::factory("smtp", $params);
    
    $mail_object->send($recipients, $headers, $body);
    ?>
    ...però non conosco il metodo factory...

    cmq grazie davvero per l'attenzione gianiaz!

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

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.