Page 2 of 2
Re: Jacek's maillinglist tutorial
Posted: Thu Oct 04, 2012 10:41 pm
by Helx
Ohhhhh
You're going to need to make your email HTML.
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
Add those to your headers (obviously change the name of the variables)
(The '.' before the equals operator 'adds' them together I believe)
Then just add your html content!
Keep in mind that HTML emails often end up in spam.
SOURCE: http://css-tricks.com/sending-nice-html-email-with-php/
Re: Jacek's maillinglist tutorial
Posted: Fri Oct 05, 2012 12:45 pm
by Fidbeck
I mean to do something like this
all pretty and stuff
for the unsubscrive link is like this
but for this one I can use the <a href > tags between ' or " i'm not sute which one
Re: Jacek's maillinglist tutorial
Posted: Fri Oct 05, 2012 2:33 pm
by EcazS
<a href="unsubscribe.php?code=as9d876ya321h">Unsubscribe</a>
I don't get what the problem is...
Re: Jacek's maillinglist tutorial
Posted: Fri Oct 05, 2012 8:06 pm
by Fidbeck
It's not a problem lol just saying that I want to make that text into a link.
Re: Jacek's maillinglist tutorial
Posted: Thu Nov 01, 2012 4:10 pm
by Fidbeck
Hello again.
I want to add a feature to the mailing list but i'm unsure how to do it.
I want to be able to as soon as the user registers it will receive a welcome message.
Re: Jacek's maillinglist tutorial
Posted: Thu Nov 01, 2012 6:20 pm
by Helx
Re: Jacek's maillinglist tutorial
Posted: Thu Nov 01, 2012 6:24 pm
by Fidbeck
I know I have to use mail function lol but how to check if a new user is registered and send an email.
or the best way is too add that mail in the registration process? something like
if no errors register and send mail
Re: Jacek's maillinglist tutorial
Posted: Thu Nov 01, 2012 10:04 pm
by Temor
well, you could have the mail() function inside your register function.
function register_user($email,$username,$password){
// Do register type stuff here.
mail($email,'Welcome','Welcome to the site');
return true;
}
Re: Jacek's maillinglist tutorial
Posted: Fri Nov 02, 2012 12:32 pm
by Fidbeck
precisely what I was refering.
You do the error checking and if no errors are found you then can send an welcome message to the user.
I was asking if that's the best way to send an welcome message to a newly registered user or the server that you are using has to have that option enabled in order to do that.
Re: Jacek's maillinglist tutorial
Posted: Fri Nov 02, 2012 7:28 pm
by Temor
Well, it is the only way I know of to send an email through PHP, but yes, it does require some tinkering on some servers. Most servers have this enabled by default, but if you're using a free host ( or even some payed hosts ) there might be a chance that they block or limit the email function to prevent spam.
Re: Jacek's maillinglist tutorial
Posted: Sat Nov 03, 2012 2:51 am
by Fidbeck
Guess i'll just do that
put mail() function in the register form
thanks