Jump to content

Sending E-mail Confirmations


cookiemonster4470

Recommended Posts

I am hoping to build a web-registration website using PHP/MySQL, but have no experience with either.

 

What is needed to send a confirmation e-mail to someone after they fill out a simple web-form and register for an event?

 

I am considering using 1&1 for my ISP, and their tech support made it sound like this could be done using PHP, but I am unsure of what is involved.  (Don't you need an e-mail server to send e-mails?)

 

The tech said there is some package included with PHP - PHP-Mail or something - that allows you to send e-mails from PHP, but again, I thought you need an e-mail server?

 

In order for this registration site to be respectable, I think it is imperative that it has the ability to send a professional-looking e-mail conformation.

 

Can someone please shed some light on this topic?

 

Thanks,

 

 

Amy

 

Link to comment
Share on other sites

Hey,

 

What you would do is,

 

create a form.

 

When the form is submitted, create a table in the database with all the info. Have a cell called approve, and give it a value of 0.

 

Use phpmailer to send out an email with a link.

 

This link would point to a file that updates the database table, setting approve to 1.

Link to comment
Share on other sites

> have you tried the mail() function to see if it works?

 

Considering that I don't have an account with 1&1 yet, and I haven't worked with PHP yet, that is kinda hard to do!  ;)

 

My post is an attempt to understand what parts are needed and how they work together.

 

I was hoping for a logical overview at this point versus specific code.

 

 

Amy

 

 

Link to comment
Share on other sites

When you sign up for a hosting account they typically create an e-mail account for you.  For example, if you signed up with hosting company Foo with domain mysite.com and chose some_user as your account name with the company, you'd typically get an e-mail address of: some_user@mysite.com

 

Whenever you use a mail function within PHP it will (usually) by default send from that e-mail account.  If your hosting company provides you with the ability to create more e-mail accounts you could certainly do so (via some web interface of theirs) and then configure your PHP installation or a specific module to use that account.

 

In short, yes, you always need an e-mail server to send e-mail, but the hosting company usually provides this for you.

 

Anyways, you can usually get the most basic membership from a hosting company for like $3 for an entire month; just figure out what the basic functionality you require is and use the cheapest membership to test if it all works.  Then if you don't like the host you can easily switch and you're not out a ton of money on your end.

Link to comment
Share on other sites

Hey,

 

phpmailer can use the sendmail function to send mail, which doesn't use your mail server.

 

You may also use SMTP, but then you have to use your hosting mailserver, and i know for a fact, if you are wanting to send alot of emails in a day, 1&1 limits it.

 

With 1&1, you can only send about 100 emails per hour.

Link to comment
Share on other sites

roopurt18, thanks for the rsponse.  That was more in line with what I was looking for.  :)

 

>When you sign up for a hosting account they typically create an e-mail account for you.  For example, if you signed up with hosting

>company Foo with domain mysite.com and chose some_user as your account name with the company, you'd typically get an e-mail

>address of: some_user@mysite.com

 

Okay, I guess I am aware that you typically get e-mail accounts, but I wasn't sure if those were just to receive e-mails on a website, or it that implied ypu could send e-mail as well.

 

If I get an e-mail account "some_user@mysite.com" do I have to worry that the headers won't match the sender's name?

 

For instance, I often check unknown e-mails in MS Outlook by right clicking and comparing the "From" with the actual e-mail address.

 

Will people see "admin@amyscompany.com" in their inbox but upon investigation see that the e-mail is really from "box6353713@1and1.com"??

 

 

>In short, yes, you always need an e-mail server to send e-mail, but the hosting company usually provides this for you.

 

Okay, that is good to know.

 

 

 

Amy

 

Link to comment
Share on other sites

envexlabs wrote:

 

>phpmailer can use the sendmail function to send mail, which doesn't use your mail server.

 

Is "phpmailer" an add-on to base PHP?

 

Then how does it send e-mail without an e-mail server?!  ???

 

 

>You may also use SMTP, but then you have to use your hosting mailserver, and i know for a fact, if you are wanting to send alot of

>emails in a day, 1&1 limits it.

>

>With 1&1, you can only send about 100 emails per hour.

 

Well, the purpose of the e-mails is just to confirm attendee registration for a seminar, so it won't be that many.  (I'd love to have an issue where more than 100 people per hour registered for a seminar!)  ;D

 

 

Amy

 

Link to comment
Share on other sites

phpmailer is just a php script.... It's basically an overlay for interaction with a mail server.... Makes things easier and what not.

 

PHP could theoretically send an email if someone coded the socket stuff and resolved dns addresses so on.... but that would be a pain....

 

You will need a mail server of some kind to send emails, but like previously stated, a webhost will usually provide that....

Link to comment
Share on other sites

corbin wrote:

 

> phpmailer is just a php script.... It's basically an overlay for interaction with a mail server.... Makes things easier and what not.

 

That makes sense.

 

 

>You will need a mail server of some kind to send emails, but like previously stated, a webhost will usually provide that....

 

Any idea what ISP's like 1&1 usually use for their e-mail server with Linux plans?

 

What about my earlier question about the file header not matching the sender name?

 

Do I have to worry that people will see the e-mail is from 1&1's e-mail server?

 

 

 

Amy

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.