Solved

SMTP authentication

Posted on 2006-12-01
7
360 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

758 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

22 Experts available now in Live!

Get 1:1 Help Now