mail..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

mail..

Post by ol4pr0 »

Oke i search around a bit.. however i am confused on what determents what is considerd spam and what not!

And how to avoid mail getting in junkmail..

Asking this since Grrr.. ms hotmail considers words like Software and Applicaciones spam?!
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Anybody got an nice example of a mail code that can send mail fetching adresses from db, and send it to each mail adress indifidual(?) without it getting into the spam junkmail box ?

Oke sending indifidual(?) mail solved with a while fetch array, just the spam i have yet to figure out.
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

Post by fresh »

are you including a subject??
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

yes i am ( also mailed it from a personal account and that didnt end up in junk mail, so its not in the text or subject.. )
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

then look at the differences in the headers you are sending...
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Seems it got something to do with the image i am including in the mail..

is there anyway to avoid this.. i am sending a html mail <html><body><img src="image.gif"> ect...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you either have to use a full url link or encode the image into the email. I don't remember how that's done, but it enlarges the mail by, well, the size of the email, so it's generally avoided..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

link i have tried, that didnt go well.. let me look into the encode image thing..

Edit: Hmm weird when using http://localhost ( its getting mailed and not ending up in the junk mail. when using the website http://www.host.com/ it is ending up into the junk mail.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's quite possible that the domain name you are using (host.com) is a known spammer-haus to them.. it could also be the image filename..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Nope it has never been used.. ( its a dummy domain for testing only.. )

image filename - image.gif What can be wrong there..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

i think this is what you mean with encoding

Email
However that example gets rejected completely.. ( rejected cuase it contains a virus.. according to ms hotmail )
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Oke this doesnt echo the image.. but will mail the code that is within the image.txt

Code: Select all

#encode, ofcourse not working.. 
$html = header("Content-type: image/gif");
$image = "image.txt";
$fp = fopen ($image, "r");
$contents = fread ($fp, filesize ($image));
$html .= '<html><body>';
$html .= base64_decode($contents);
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

images need to be encoded seperately from other data types, and your header call, is to the browser generating the script, not to the email..
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

could you give an example on that ?
User avatar
fresh
Forum Contributor
Posts: 259
Joined: Mon Jun 14, 2004 10:39 am
Location: Amerika

Post by fresh »

open up outlook and insert your image, then save it as an .eml file then open it in notepad and copy everything below the date line and then paste it into your code, walla... instant base 64 code... :)
Post Reply