Welcome! Log In Create A New Profile

Advanced

Topic 4C

Posted by mauritz 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Topic 4C
July 29, 2009 11:12PM
Done.

Another great tutorial this one! Love the fact that you can respond to a form with a mail() function, just a pity I couldnt utilise it to the fullest because the testing server does not allow me to send the actual mail
avatar Re: Topic 4C
August 03, 2009 11:09PM
Done with 4C (but not entirely...)

I setup a mailserver (hMailServer and not Mercury as supplied with XAMPP) on my PC and could successfully send the email when executing bookform.php and thankyou.php. However, I was not successful in setting up an Outlook Express account in order to connect to the local mail server to retrieve the sent email.

hMailServer is free and seems simple enough but I lack experience with setting up mail servers! I know we are not supposed to do this (send an email successfully in this task), but I would like to get it right as it should be possible. I mean the mail server seems happy to accept the mail from the php app, so to connect to the mail server should be easy enough confused smiley.

Can someone please help?
Re: Topic 4C
August 06, 2009 03:50PM
Task 4C complete. Ordo did you see Macs comments regarding XAMPP in the forum for PHP first semester. Doesn't really help with what you want to do but might explain?
Re: Topic 4C
August 11, 2009 04:05PM
Activating the Email Form with PHP.It`s often more efficient to process everything in the same page ( html + php )
Set the action attribute of the form to process itself by using a variable from the server superglobal array.

Example:
< form id = " contactform " name = " contactform " method = " POST " action = " <? php echo $_SERVER [ ' PHP_SELF ' ] ; ?> " >

NOTICES
- Mac users should be able to send a test email from their local computer. but Windows users will need to have set up the corect SMTP setting.

- it`s important to understand that mail ( ) isn`t an email program. It passes the address, subject line, message, and any additional email headers to the web server`smail transport agent ( MTA ).
PHP`s responsability ends there. It has no way of knowing if the email is delivered to its intended destination.

- Email doesn`t always arrive when testing mail ( ) in a local testing environment.
Normally, this has no nothing to do with your configuration, but with your service provider`s security policies. If email fails to arrive , upload the script to your remote serverand test it there.
Re: Topic 4C
August 11, 2009 04:50PM
Ordo where do i get hMailServer or does it come with xammp

smoking smiley When all else fails , read instructions grinning smiley
smiling smiley Reading is a course on it's own ! smiling smiley
Re: Topic 4C
August 11, 2009 07:20PM
Topic 4C done

smoking smiley When all else fails , read instructions grinning smiley
smiling smiley Reading is a course on it's own ! smiling smiley
Anonymous User
Re: Topic 4C
August 17, 2009 12:27PM
Done with the topic, but I would really love to see the results for myself (not just the 'expected' error message eye popping smiley ). I guess the best way to test this would be to upload to a server and test from there?
avatar
Mac
Re: Topic 4C
August 18, 2009 07:43AM
Yip. But simple mail functions hardly ever gives problems - it when you need to add attachments etc that it gets a bit harder.....
avatar Re: Topic 4C
August 23, 2009 03:06PM
Completed 4C

Would have loved to see the email work though.
fcb
Re: Topic 4C
August 26, 2009 02:33PM
Done.

The following additional settings worked for me and I could send the e-mail:

ini_set("SMTP", "mailserver.com"winking smiley;
ini_set("smtp_port","25"winking smiley;
ini_set("sendmail_from","youremail@server.com"winking smiley;

I added the code just before the if (mail($mail_to,$mail_subject,$mail_body)) { clause
fcb
Re: Topic 4C
August 26, 2009 02:36PM
that came out wrong :p
those winking smileys should be )
Re: Topic 4C
August 30, 2009 05:31PM
Done. Awesome topic.
Re: Topic 4C
September 03, 2009 12:03PM
Done 4C. I agree with Lordric would have liked to see email work.
avatar Re: Topic 4C
September 14, 2009 12:23PM
Again life bit my behind, having moved and things settling down again, I got this one done.

Chris
~~~~
"Cleverly disguised as a responsible adult."
avatar Re: Topic 4C
September 15, 2009 01:27PM
Completed... it's amazing how simple the code, for validating whether the email has been sent, is. Great stuff
Anonymous User
Re: Topic 4C
September 20, 2009 12:56PM
Topic 4C done
avatar Re: Topic 4C
September 29, 2009 02:20PM
Done with 4C!

This one was a brain teaser but got the email working with hMailServer and setting the php.ini file setting id the code as fcb showed


Thanks fcb and ordo

Cheers thumbs up
Re: Topic 4C
October 02, 2009 11:17AM
Done; i always wanted to know how, but i know...
Sorry, only registered users may post in this forum.

Click here to login