Email/SMTP::NET Problems

B

Brantley Shields

I no longer have access to the logs so I can't reproduce the error, but
my administrator told me he thinks there may be an error in the mysql
regarding varchar of some sort. Hes looking into it for me as well. But
I attempted the

em = "#{ em }"

with no luck at all, same Internal Error problem. Thanks again

brantley
 
A

ara.t.howard

I no longer have access to the logs so I can't reproduce the error,
but
my administrator told me he thinks there may be an error in the mysql
regarding varchar of some sort. Hes looking into it for me as well.
But
I attempted the

em = "#{ em }"

with no luck at all, same Internal Error problem. Thanks again

brantley

you've got to post some errors if you want some insight - otherwise
we're just gropping in the dark. you might want to mention, to your
boss, that developing web apps without log access is a giant waste of
money - yours and ours.

btw Internal Error is generally a syntax error or permissions issue.

get your code running correctly from the command line and them move to
your cgi environment. you aren't running in se-linux by any chance
are you? also, none of the code you've shown us has had anything to
do with mysql?

regards.

a @ http://codeforpeople.com/
 
B

Bill Kelly

From: "ara.t.howard said:
you might want to mention, to your
boss, that developing web apps without log access is a giant waste of
money - yours and ours.

Agreed. However, if you really don't have access to the log files,
it may help to put a line like this at the top of your script:

orig_stderr = $stderr; $stderr = File.open("mylog.log", "a"); $stderr.sync = true


This won't help if your code contains a syntax error such that
Ruby can't compile your code at all. However, it will redirect
*runtime* error output to "mylog.log". (Obviously you may
need to specify a full path to somewhere on the system you have
permission to create files. Like "/home/brantley/mylog.log" or
something...)


Hope this helps,

Bill
 
B

Brantley Shields

Greetings everyone,

I've been browsing more and more all day to find a solution to this
problem and this guy at:

http://www.ruby-forum.com/topic/100888#new

Had the exact same problem I'm having. His error was the email address
was tainted because it was a user submitted via a form. I tried the
solution of adding the following:

to_address = cgi['email']

Net::SMTP.start('lsdfus.hisdfint.edu') do |smtp|
smtp.open_message_stream('(e-mail address removed)',to_address.untaint) do
|f|
f.puts "From: (e-mail address removed)"
f.puts "To: Brantley Shields"
f.puts "Subject: Test Message"
f.puts
f.puts "This is a test email!"
end
end

This still produces the same error, does this help enlighten anyone?

brantley
 
B

Brantley Shields

Solution:

to_address = cgi['email'].strip


I don't know why, but between strip and untaint my problem is solved.
Thank you all

Brantley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

net/smtp Multiple Email recipients Issue 2
Simple SMTP server in ruby 2
net/smtp 6
SMTP SMS Reminder Script 5
Mail Using SMTP Problem 2
net/smtp question 6
Problems sending mail 0
Net/SMTP Question 0

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top