Issue with mailing list

Post here is you are having problems with any of the tutorials.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:but the tester message is not pulling through on my google and hotmail account,
That is most likely because they both have excessive spam filtering rules.

There are some extra headers you should add, pretty good info here http://www.transio.com/content/how-pass ... s-php-mail
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:There are some extra headers you should add, pretty good info here http://www.transio.com/content/how-pass ... s-php-mail
Ok, I have just tried editing it with no joy, am I meant to modify the coding that is already given to me or just add the extra to it?

This is my downfall, once I have coded, I don't know how to play with the coding and edit it. :oops:
<?php

include('../core/init.inc.php');

  $header .= "Reply-To: Some One <gianni@chatablog.com>\r\n"; 
    $header .= "Return-Path: Some One <gianni@spaghettijohns.co.uk>\r\n"; 
    $header .= "From: Some One <chatablog@justhost.com>\r\n"; 
    $header .= "Organization: My Organization\r\n"; 
    $header .= "Content-Type: text/plain\r\n";

if (isset($_POST['subject'], $_POST['message'])){
	mail_all($_POST['subject'], $_POST['message'], $header);
}



?>
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

You need to edit the information in the headers to be relevant to you, ie put your email address. It should also be an email address hosted at the server that the email actually comes from.
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:You need to edit the information in the headers to be relevant to you, ie put your email address. It should also be an email address hosted at the server that the email actually comes from.
Ok, I have tested it with it being tester@chatablog.co.uk which is currently on my site but no joy. Can i just double check that what I have coded is correct.
 $header .= "Reply-To: Some One <tester@chatablog.co.uk>\r\n"; 
    $header .= "Return-Path: Some One <tester@chatablog.co.uk>\r\n"; 
    $header .= "From: Some One <tester@chatablog.co.uk>\r\n"; 
    $header .= "Organization: My Organization\r\n"; 
    $header .= "Content-Type: text/plain\r\n";


if (isset($_POST['subject'], $_POST['message'])){
	mail_all($_POST['subject'], $_POST['message'], $header);

}
?>
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

It looks okay, what is the problem now ? Still just no googlemail ?
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

I have just double checked, there is nothing coming into my googlemail and hotmail account using the file below.

<?php

include('../core/init.inc.php');

 $header .= "Reply-To: Some One <tester@chatablog.co.uk>\r\n";
    $header .= "Return-Path: Some One <tester@chatablog.co.uk>\r\n";
    $header .= "From: Some One <tester@chatablog.co.uk>\r\n";
    $header .= "Organization: My Organization\r\n";
    $header .= "Content-Type: text/plain\r\n";
 
 
if (isset($_POST['subject'], $_POST['message'])){
        mail_all($_POST['subject'], $_POST['message'], $header);
 
}

?>
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

Are you sending it from the server that hosts chatablog.co.uk or your local server ?

Also can you use the php button when posting code, I have edited every post you made in this topic and I'm getting a bit bored ;)

And tired actually, but I can hear the person in the room above my typing so I have to wait for him to go to bed...

*ramble ramble*
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:Are you sending it from the server that hosts chatablog.co.uk or your local server ?
It is coming straight from chatablog.co.uk - i haven't done a local server.
jacek wrote:Also can you use the php button when posting code, I have edited every post you made in this topic and I'm getting a bit bored ;)
Woops sorry :oops: - to be truthful I didnt realise I the php button until now, i do wear glasses that is my downfall and my brain is the size of a kp nut :( not even salted either :( lol

Are you not a heavy sleep then? bugger. stick ur head under the duvet and also a pillow over ur head will do the job. that should muffle out any side, even if u hear a car accident outside... u wont lol.. :lol:
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:It is coming straight from chatablog.co.uk - i haven't done a local server.
hmm... does the email account tester actually exist ?

not really sure other than that :?

How many mails are you sending, it could be flood control your host uses.
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

Ok,

I have tried every beeping way I can think of and no cigar. I am trying to send it to 3 of my email address, 1 a gmail account, the other 2 is a hotmail.co.uk and .com and nothing.

Is there anyway to echo out if there are errors when sending? :(
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:hmm... does the email account tester actually exist ?
Yes it does exist, that is 1 i use all the time for testing
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

I noticed 1 thing though, if I look at your tutorial, you have
if (isset($_POST['subject'], $_POST['message'])){
	mail_all($_POST['subject'], $_POST['message'], 'From: admin@spaghettijohns.co.uk');
}
Now the isset and the mail_all should be highlighted the same colour yes? In my dreamweaver isset is highlighted green (the normal php colour in dreamweaver) and mail_all is in black - not sure if that makes a difference but could it be the function mail_all is not functioning at all?

Is there any echo I can try for this to know the file is sending out with no issues?
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

Hi Jacek,

Im not sure what I did but today it started to work, I used the original code that you done on your tutorial
<?php

include('../core/init.inc.php');

if (isset($_POST['subject'], $_POST['message'])){
	mail_all($_POST['subject'], $_POST['message'],
	'From: pasq@spaghettijohns.co.uk');
}

?>
The emails are coming through great, although I don't get a space in the email between greeting the person and the message.

Hi, pasq\/\/This is a tester

Unsubscribe:


**If you persist long enough, maybe just maybe... the php coding will give up and let you have it** hehe :D
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:Now the isset and the mail_all should be highlighted the same colour yes? In my dreamweaver isset is highlighted green (the normal php colour in dreamweaver) and mail_all is in black - not sure if that makes a difference but could it be the function mail_all is not functioning at all?
That's just the syntax highlighting on the forum, it only highlights functions that are part of php :?
pasqo83 wrote:The emails are coming through great, although I don't get a space in the email between greeting the person and the message.
Well that's good, as for the missing space, you most likely just need to add an extra space somewhere. What does your mail.inc.php file look like now ?
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:Well that's good, as for the missing space, you most likely just need to add an extra space somewhere. What does your mail.inc.php file look like now ?
Im at work now so unable to show you, it is pretty identical to your tutorial, everything thats suppose to be on the same line on your tutorial is the same in my mail.inc.php but you never know, I may have sneezed and not realised I pressed an extra button on my keybaord hehe :)

I will complete the subscription form tonight and work on the header after to create the html emails so will have a little play tonight as my mrs has caught the bug, means its more php time for me... wooo hoooo :D shhhh though, don't tell the mrs :oops: ;)
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:as my mrs has caught the bug, means its more php time for me... wooo hoooo :D shhhh though, don't tell the mrs :oops: ;)
ooo thats brave ! what is she joins ! :lol:
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:ooo thats brave ! what is she joins !
Unless BetterPHP is a clothes shop I can safely say, she will not be joining. :D

1 final problemo :( sorry Jacek or whoever will assist. I feel like a pain in the arse here :( (sorry can we use the word arse? hmmm )

Removing a subscription - i have gone back to your video 2 and it is letter for letter and word for word correct so cannot think what else could be the issue. Can you assist please?

Remove user (from the mail.inc.php)
// REMOVES THE EMAIL ADDRESS FROM THE TABLE
function remove_user($email){
	$email = mysql_real_escape_string($email);
	
	mysql_query("DELETE FROM `users` WHERE 'email' = '{$email}'");
		
}
Coding from the unsubscribe.php
<?php

include('../../core/init.inc.php');

if (isset($_GET['email'])){
	remove_user($_GET['email']);
}

?>
p.s I don't mind contributing for the amount of times i've been assisted :oops:
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:(sorry can we use the word arse? hmmm )
I'm not a priest ! Just avoid the big ones ;)
WHERE 'email' = '{$email}'
The column here should have backticks around it.

You are asking mysql to compare the the email address passed to that function to the literal string "email".
Image
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

jacek wrote:
pasqo83 wrote:The column here should have backticks around it.
Bloody back ticks, just been watching your php basic tutorials, i feel like I know everything but know how to do nothing. lol i will get there.

Many Thanks Jacek :D
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
pasqo83
Posts: 106
Joined: Sat May 14, 2011 6:23 am

Re: Issue with mailing list

Post by pasqo83 »

Hey Jacek, did you do a video on creating a html email? Im sure I watched it the other day, I cant seem to find it :(
  • Empty your mind, be formless like water. If you put water into a cup, it becomes the cup. You put water into a bottle and it becomes the bottle. You put it in a teapot it becomes the teapot. Now, water can flow or it can crash. Be water my friend.
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Issue with mailing list

Post by jacek »

pasqo83 wrote:Hey Jacek, did you do a video on creating a html email? Im sure I watched it the other day, I cant seem to find it :(
I did,

PHP Basics playlist, most recent video.
Image
Post Reply