is this still working

58 views
Skip to first unread message

Ahmed Aman

unread,
Aug 23, 2014, 6:14:19 PM8/23/14
to websc...@googlegroups.com
I've tried email form and had no luck, is web script still working?

Steve Marx

unread,
Aug 23, 2014, 6:15:03 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
We're not aware of any current issues. Maybe you can share your code and explain what's going wrong when you tried it?



On Sat, Aug 23, 2014 at 3:14 PM, Ahmed Aman <ama...@gmail.com> wrote:
I've tried email form and had no luck, is web script still working?

--
You received this message because you are subscribed to the Google Groups "Webscript.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webscriptio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ahmed Aman

unread,
Aug 23, 2014, 6:19:02 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
local USERNAME = '<**@gmail.com>'
local PASSWORD = '<***>'
local SERVER = '<smtp.gmail.com>'
 
email.send {
server=server, username=username, password=password,
from='he...@webscript.io', -- replace with your 'from' address
to=***@gmail.com',   -- replace with your 'to' address
subject='Anonymous greeting',
text=request.form.message
}
return "Email sent. Thanks man!" 

<form action="http://mo.webscript.io/anon" method="post" class="form-horizontal">

<div class="control-group">

<label for="message" class="control-label">Enter a message:</label>

<div class="controls">

<textarea name="message" rows="3"></textarea>

</div>

</div>

<div class="control-group">

<div class="controls">

<button type="submit" class="btn btn-primary">Send</button>


this isn't working!. sometimes i get a 500 response or 200.

Ahmed Aman

unread,
Aug 23, 2014, 6:23:29 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
And on contact form I keep getting captcha failed!


On Sunday, August 24, 2014 3:15:03 AM UTC+5, smarx wrote:

Steve Marx

unread,
Aug 23, 2014, 6:35:49 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
What do you mean "on contact form I keep getting captcha failed"? Have you built a contact form? What does the code for that look like?

Steve Marx

unread,
Aug 23, 2014, 6:36:20 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
It looks like you're trying to send mail from "he...@webscript.io", which won't work since you don't own that account.

Steve Marx

unread,
Aug 23, 2014, 6:38:00 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
Also, unless it's just some sort of copy/paste error, it looks like you have angle brackets (<>) around all your strings. E.g. it should just be 'smtp.gmail.com' not '<smtp.gmail.com>'.

Ahmed Aman

unread,
Aug 23, 2014, 6:38:44 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
I've changed that email to the one I'm using for the local usernme. but still i get an error 500 and the log says "Server is required."

Ahmed Aman

unread,
Aug 23, 2014, 6:43:26 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
Ive done everything you've asked to correct but still keeps getting the same error. "server required".

Ahmed Aman

unread,
Aug 23, 2014, 7:00:14 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
the contact form is working now. 

Steve Marx

unread,
Aug 23, 2014, 7:12:53 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
Do you mean that you were able to fix your issue? Or are you still having trouble?

Ahmed Aman

unread,
Aug 23, 2014, 7:24:19 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
Well what was wrong with my contact form was I wrote a wrong private captcha key in the script. but after correcting that it worked but I was able to send only one test submission through that form, and now again i keep getting the error 500. the log says the captcha was verified there seems to nothing wrong, but why do i get this error. also I don't get any submissions now.

Steve Marx

unread,
Aug 23, 2014, 7:26:24 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
Can you share your current code?

Also, when you get a 500 error, you will often see a message in the log telling you what your error was.

Ahmed Aman

unread,
Aug 23, 2014, 7:27:53 PM8/23/14
to websc...@googlegroups.com, ama...@gmail.com
local USERNAME = '**@gmail.com'
local PASSWORD = '**'
local SERVER = 'smtp.gmail.com'
local RECAPTCHAKEY = '**'
local recaptcha = require 'recaptcha'
local markdown = require 'markdown'
 
if recaptcha.validate(RECAPTCHAKEY, request) then
html = markdown(request.form.body)
email.send {
server = SERVER, username = USERNAME, password = PASSWORD,
from = '**@gmail.com', to = '**@gmail.com',
subject = '[contact form] '..request.form.subject,
text = request.form.body,
replyto = request.form.replyto,
html = html
}
return '<p>Sent the following mail:</p>'
..'<p>Subject: '..request.form.subject..'</p>'
..html,
{['Content-Type'] = 'text/html'}
else
return 'Failed CAPTCHA.'
end

Steve Marx

unread,
Aug 23, 2014, 8:37:49 PM8/23/14
to Ahmed Aman, websc...@googlegroups.com
It's hard to know what the issue is... we'll work on adding better logging for SMTP errors. But it generally means the server you're trying to send email through is returning an error. (Maybe you have the wrong credentials or are trying to send as the wrong user.)

Steve Marx

unread,
Aug 23, 2014, 8:57:47 PM8/23/14
to Steve Marx, Ahmed Aman, websc...@googlegroups.com
FYI, I just rolled out some more detailed logging for SMTP authentication errors, so if that's what's happening, then the next time you get an error you should see information in the log about what happened.
Reply all
Reply to author
Forward
0 new messages