|
| [WebDev] Problem sending e-mail with php-project |
| Iniciado por guest, 18,mar. 2015 14:01 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 18,marzo 2015 - 14:01 |
Hi all,
I'm creating a new website for our company. The new website contains a support-form but I'm not able to send it.
The project itself is a Dynamic php project. We're using this because we cannot modify the server-configuration.
The main problem is some parameter of EmailSendMessage() is missing (debugger says). But according to the docs (<a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.windev.com/en-US/?3032005&verdisp=190">http://doc.windev.com/en-US/…</a>) there are no parameters needed.
This is the code I've written to validate and send the form.
EmailReset() Email.Sender = EDT_Email Email.NbRecipient = 1 Email.Recipient[1] = "support@localhost" Email.Subject = "Support Request" sMessage is string = "This message has been sent from our company website" + Charact(10) + ... "Name: "+ EDT_Name + Charact(10) + ... "E-Mail: " + EDT_Email + Charact(10) + ... "Phone: " + EDT_Phone + Charact(10) + ... "Question: "+ EDT_Question Email.Message = sMessage EmailSendMessage() Info("Your question has been submitted") Thanks in advance
Jeroen De Meerleer |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,marzo 2015 - 15:06 |
Hi Jeroen,
Is your php server configured correctly? You can also try to do it in PHP directly if you want: <a class="ExternalLink" rel="nofollow" target="_blank" href="http://27130.foren.mysnip.de/read.php?27131,26630,26630">http://27130.foren.mysnip.de/read.php…</a> (This could be an interesting test.)
Our first website was PHP. After a year or two, we switched permanently to AWP which is much better in every cases.
Best regards, Alexandre Leclerc |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,marzo 2015 - 15:27 |
Hi Alexandre,
I did it in PHP first (got it working, btw) but my boss was complaining about it. I have to do it in W-Language and not PHP (I think he doesn't know it gets converted afterwards)
Do you see any mistake in the code I provided? I really want to get this working as soon as possible.
PS. In case you were wondering I'm using WebDev 19. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 19,marzo 2015 - 13:51 |
Hi Jeroen,
Well, drop a call to PCSoft Free Technical Support. They might have an idea, and send them the full error message. Unfortunately I have too few (and old) experience with PHP in WebDev. The last time I made PHP in WebDev was in version 12 or 14 I believe, and hoped I would never have to do that again! <img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":-)">
I remember I had to make some configurations on the linux server itself. (Configuring the sendmail program, like which SMTP server to use? Or was it in the PHP configuration?)
I understand that you might have no choice altogether to use PHP in your context, but AWP is the way to go, and is now our choice. No, it is not free, but in the end this is cheaper because it just works. Paying programmers is expensive. A year of web hosting in AWP is less than a single day of salary for a good programmer! This was really not hard to take that decision. (And for in-house servers, this is not a single penny for 10 connection, aside the setup time.)
Best regards, Alexandre Leclerc |
| |
| |
| | | |
|
| | |
| |
| Publicado el 19,marzo 2015 - 15:24 |
Jeroen,
I did a project similar to yours a few months ago. I found that for php EmailSendMessage simply doesn't work in the debugger, so I use this code:
IF NOT InTestMode() THEN // EmailSendMessage doesn't work when debugging php code IF EmailSendMessage() = False THEN Error("Error sending email") END ELSE MyTrace("EmailSendMessage not called--in debugging mode!") END In comparing your code with mine, I don't see anything missing, so it does make me think it might be a server/php configuration issue.
...jack |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 19 mensajes |
|
| Publicado el 27,junio 2015 - 01:08 |
Hi everybody,
I have a similar problem with WB19 and sending mails in a PHP project. In the test mode, I can't send any mail. Is it necessary to upload the project to a server only for test if the emials are sent?
Thanks in advance. Jordi |
| |
| |
| | | |
|
| | | | |
| | |
|