| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| mail() help | |
|---|---|
| Tweet Topic Started: Jun 19 2005, 06:32 PM (899 Views) | |
| Dennis | Jun 19 2005, 06:32 PM Post #1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I've been coding a referral program for a site I Admin, and I've run into a problem with sending an E-Mail confirming registration. Here's the code:
It does not throw any errors, and the message displays fine, but the E-Mail is never received. Any ideas what I've done wrong? This is only the E-mail part of the file. I can give you the rest, but it's rather long. |
![]() |
|
| Das | Jun 19 2005, 09:35 PM Post #2 |
![]()
Smells of rich mahogany
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Is this code to e-mail everybody? I am a bit of a n00b here, but:
This would insinuate yo uare e-mailing everyone in that row. |
![]() |
|
| FearKiller | Jun 19 2005, 09:54 PM Post #3 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
What is the value of $email? Why is that stray curly bracket there? That loop you have there will only set $id to one value when it's done as it will be constantly overwrite it by the next value in the table. I can't really tell much more because of the stray curly bracket and not knowing how the value of $email is set. EDIT: Email filters may be causing unsuccessful delivery as well. You can usually fix this by altering your email headers. |
![]() |
|
| pingu2k4 | Jun 20 2005, 04:03 AM Post #4 |
|
Member
![]() ![]() ![]() ![]()
|
what does this code do by the way, does it collect info from a form? |
![]() |
|
| Jory | Jun 20 2005, 04:35 AM Post #5 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I added/changed the stuff thats blue. Now, you can see if it actually mails. (Happend to me that it didn't error, but didn't mail eighter) And those 2 brackets made no sence. (Yes, 2)
They don't do anything. :/ So removed them ![]() If it won't mail, try a easier mailing script. (Just to test if mail() is enabled on the server. Some have it turned off :/ ) If mail() does work, but this still doesn't, let it echo the contens of $email to see if that is set right. |
![]() |
|
| Dennis | Jun 20 2005, 11:26 AM Post #6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@ Fear Killer: The value of E-Mail is $_POST['email'] @Qj: The part you removed is the part that fetches the id from the database. The thing I'm having trouble with is that it worked fine before. Then we switched hosts, so it may be that. but it may also be that I changed something. I'm not sure. I'm waiting for a reply from the host. |
![]() |
|
| Das | Jun 20 2005, 12:47 PM Post #7 |
![]()
Smells of rich mahogany
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This is gonna' sound really stupid, but I have done it before. Are all you forms and there corresponding $_POST['']'s matching up? |
![]() |
|
| Jory | Jun 20 2005, 01:13 PM Post #8 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No its not :/ Those {} started right after mysql_num_rows(), which is not a loop-starting function. It only sets the amount of rows of the query to $num_results. In this case, its not needed at all. If all that changed is the host, see if it has mail() enabled. Just do something like:
It will let you know if you can use mail() (Because like I said: Some hosts have mail() disabled because its being abused a lot or because its to much work for there servers or something) |
![]() |
|
| solinent | Jun 20 2005, 04:14 PM Post #9 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
or if they were playing around with it, there might of been some relay problems. Did you try it locally? |
![]() |
|
| bttfpromo | Jul 5 2005, 09:43 PM Post #10 |
|
LUEser.......
![]() ![]() ![]() ![]()
|
Use....
|
![]() |
|
| solinent | Jul 6 2005, 11:20 AM Post #11 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
Nah, that won't work. It's the same thing. Just try it locally. |
![]() |
|
| Jory | Jul 6 2005, 12:55 PM Post #12 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Little note on the locally trying: You would have to install a mailserver program for that. Most php progs I know don't have something for that build in. (Is php progs the right name btw? I mean the prog that lest you do php on your own pc by surfing to localhost.) Damn I'm sounding stupid here. |
![]() |
|
| solinent | Jul 6 2005, 03:05 PM Post #13 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
OH yeah. If you install iis with php, then you get a virutal mailserver, as I dont' use apache. Whatever. |
![]() |
|
| blakeo_x | Jul 8 2005, 07:22 AM Post #14 |
![]()
I cant believe its not PHP!
![]() ![]() ![]() ![]() ![]()
|
This may be a little off-topic, but my experiences with mail() have been bad as far as security. Most of the time the email gets intercepted by a spambot and then the person being emailed gets 1,000 extra bulk emails per day. Im not sure how to fix it as I havent looked into it that much. But, just to give you a heads-up
|
![]() |
|
| solinent | Jul 8 2005, 10:26 AM Post #15 |
|
Member
![]() ![]() ![]() ![]() ![]()
|
100% why I use asp... It's easier to use too... it's like this: <% set myMail = Server.CreateObject("Mail.CDO") myMail.From = "me@example.com" myMail.To = "you@example.com" myMail.HtmlBody = "<h1> Hey What is up Dude!!! </h1>" myMail.Subject = "Sup?" 'send the mail myMail.Send %> It's ppretty secure. I've never been intercepted. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Technology Chat · Next Topic » |
- Pages:
- 1
- 2
| Track Topic · E-mail Topic |
9:07 AM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)






9:07 AM Jul 11