XPertMailer Home Page
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Authentifizierungstyp zum Mailserver angeben?

 
Post new topic   Reply to topic    XPertMailer Forum Index -> Requests
View previous topic :: View next topic  
Author Message
Scout



Joined: 18 Sep 2007
Posts: 21
Location: Germany

PostPosted: Wed Sep 19, 2007 1:52 pm    Post subject: Authentifizierungstyp zum Mailserver angeben? Reply with quote

Hallo XPertMailer Team,

Ich habe mich dazu entschlossen die Mail-Klasse zu verwenden mit der Direktverbindung zum Mailserver per tls/ssl.
D.h. ich instanziere die Mail-Klasse, setze Mail Adresse & Text, mach ein Connect() zum Mailserver und übergeb der Send()-Fkt. die Connection-Resource.

Leider fehlt mir irgendwie die Möglichkeit bei der Connect()-Funktion den Authentifizierungstyp anzugeben.

Habe dann mal in die SMTP5::Connect()-Fkt. geschaut und festgestellt, dass dort ein $auth['default'] abgefragt werden könnte, dieser allerdings mit "$auth['default'] = $auth['login'] = $auth['plain'] = $auth['cram-md5'] = false;" zwangsweise auf FALSE gesetzt wird.

Wie kann man einen Default-Authentifizierungstyp (z.B. cram-md5) angeben?

Grüßle Scout
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 14 Aug 2007
Posts: 136

PostPosted: Thu Sep 20, 2007 2:45 am    Post subject: Reply with quote

You can use the function auth() from SMTP Class to set the authentication type, more info here: http://xpertmailer.com/documentation/smtp/auth.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Scout



Joined: 18 Sep 2007
Posts: 21
Location: Germany

PostPosted: Thu Sep 20, 2007 11:09 am    Post subject: Reply with quote

I have this constellation:
Code:

<?php
        define('DISPLAY_XPM4_ERRORS', true); // display XPM4 errors
        require_once 'mail402/MAIL.php';
        mb_internal_encoding("utf-8");

        $m = new MAIL;
        $m->From('sender@domain.de', 'Sender', 'UTF-8');
        $m->AddTo('rcpt@domain.de', 'Recipient', 'UTF-8');
        $m->Subject('Testmail', 'UTF-8');
        $m->text('bodytext inside the mail', 'UTF-8');

        $c = $m->Connect('mail.mailserverdomain.de', 465, 'username', 'password', 'tls') or die(print_r($m->Result));

        echo $m->Send($c) ? 'Mail sent !' : 'Error !';

        $m->Disconnect();
?>


Sorry, but I think it´s impossible to set the authentication without doing the authentication step-by-step via stream_socket.

Is it possible to enlarge the connect() function with $type-argument and you loop through it to the auth() function?

Regards Scout
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 14 Aug 2007
Posts: 136

PostPosted: Thu Sep 20, 2007 1:56 pm    Post subject: Reply with quote

Yes, i will do this, for SMTP::Connect() and MAIL->Connect(). This feature will be available in the next release of XPM4 (v.0.3). Now i prepare to launch this new release.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Scout



Joined: 18 Sep 2007
Posts: 21
Location: Germany

PostPosted: Sun Sep 23, 2007 11:02 am    Post subject: Reply with quote

Alternatively make a new funktion setAuth() like the priority-funktion. Thise have the advantage to have a backwards compatibility. Very Happy
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 14 Aug 2007
Posts: 136

PostPosted: Tue Sep 25, 2007 1:13 pm    Post subject: Reply with quote

In Mail Class you can set the global value for authentication method by using the deprecated method:
Code:
$m = new MAIL;
$m->Auth = 'cram-md5';
You need to run XPM4 v.0.3 or greater.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    XPertMailer Forum Index -> Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group