Solved

SMTP authentication

Posted on 2006-12-01
7
361 Views
Last Modified: 2012-06-27
Hey everyone,

Well I am developing a page to integrate smtp authentication.  I have read a couple of the pages already on here. ref here:
http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21552409.html?query=smtp+authentication&topics=103
http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_21465053.html?query=smtp+authentication&topics=103

I am working on the first one at the moment.  The problem I am having is that it appears that it is not sending the final "." on a line by itself to start the data transfer.  I can see in my mail logs where it authenticates and accepts the from and to, but it then states the following:
11/30/2006 11:11:49 PM - (   405) 354 Enter mail, end with "." on a line by itself
11/30/2006 11:12:49 PM - (   405) Transmission did not end with "." on a line by itself. Disconnecting...

As you can see there is almost a full minute between the entries.  The page will just sit there with no activity.  So this leads me to believe two things:
1.  There is a configuration error with my settings in php.ini or IIS.
2.  My mail server is incompatible with this script.

I would try phpmailer but I had issues with that when I tried it also.  So I figure one question at a time.
Thanks for your time.
Termlimit
0
Comment
Question by:termlimit
  • 3
  • 2
  • 2
7 Comments
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 250 total points
ID: 18052123
SMTP auth is not possible with the php-mail-function. phpmailer can handle SMTP-auth correctly. So whts the problem with phpmailer?
0
 
LVL 4

Author Comment

by:termlimit
ID: 18052134
I will get the error for phpmailer.  But a side note on what was posted above.  If it is not possible then how did the other people in the 21552409 post make it work?

0
 
LVL 48

Expert Comment

by:hernst42
ID: 18052156
21552409 is not using the php-mail-function. They use a own written function which talks directly to the SMTP-server. Might also be an issue of your mail-server. Are the logs given above from php-mailer or from the mail-server?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Accepted Solution

by:
ingwa earned 250 total points
ID: 18052315
What issues did you experience when using phpmailer termlimit?

Did you know you can also define your authentication in your script where you are calling the classes.  The examples online contain some very useful code:

http://phpmailer.sourceforge.net/extending.html

Once you are authenticated, the script should function like any other mailing script.

Hope this helps.
0
 
LVL 4

Author Comment

by:termlimit
ID: 18054904
The original error with phpmailer was the following:
allow_call_time_pass_reference = off
The php_error.log was complaining about that being off and I need to turn it on.  I went ahead and turned it on, restarted the service.  Now I get no errors from phpmailer, php_error.log, or my mail log.
0
 
LVL 4

Author Comment

by:termlimit
ID: 18057925
Well thanks for the help fellas.  I split the points.  As hernst42 told me to ditch the original and go back to phpmailer.  While ingwa gave me the extending section to look at.  Thanks for the promptness.  Grade 'A'!

-T
0
 
LVL 18

Expert Comment

by:ingwa
ID: 18058122
Oh great termlimit, I'm pleased you were able to resolve the issue.  I haven't come across the allow_call_time_pass_reference = off before and will be sure to look it up shortly.  I'm pleased that the link I provided was useful and hope that you enjoy using phpmailer as much as I do.  Standardisation of code is so much better, and with solid programming as demonstrated in the classes, you can't go wrong :)

Thanks for the points and the greatds and good luck with your project.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now