Solved

SMTP authentication

Posted on 2006-12-01
7
362 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 18

Accepted Solution

by:
Mark Gilbert 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:Mark Gilbert
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

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 …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

832 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