Solved

SMTP authentication

Posted on 2006-12-01
7
365 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

724 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