PDA

View Full Version : Brainjar - Forms


mallybills
10-02-2006, 09:53 AM
I am using a script from brianjar.com and need to know what to put for the smtpServer if my site is hosted with DiscountASP.

Also, can anyone tell me what I should NAME the vbscript so that the form knows where to look?

Help - I'm kind of new at this...

mallybills
10-02-2006, 09:55 AM
Nevermind on the naming thing. Got it...

mallybills
10-02-2006, 10:05 AM
Okay. I guess I don't have this figured out.


I've got the form done with all of the variables done. I've got the script, but I don't know if I should name it with an .asp extension or vbs.


I'm assuming it should be formmail.asp and I've got it in a scripts folder so the reference in the form is <form action="scripts/formmail.asp" method="post">


Is this correct?

bruce
10-02-2006, 10:27 AM
1) You should set the SMTP server to "localhost"

2) You can name the script to whatever you like. You just make sure the calling page uses the same name.

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

mallybills
10-03-2006, 02:29 AM
But what should my extension be? Should it be .vbs or .asp? Either way, it doesn't like what it is now.

mallybills
10-03-2006, 03:56 AM
Also,with Discountasp.com, is the mailComp = "ASPMail"?

Let me know.

bruce
10-03-2006, 06:26 AM
No. We do not support ASPMail because it causes server problem.

We support

ASPEmail
CDO
Jmail



Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

maidanet
01-02-2007, 04:39 AM
Sorry to reopen an old thread...

I'm trying to set up the formmail.asp script here.

Here are my settings, garnered from various posts throughout these forums:
[quote]referers=Array('www.mydomain.com','mydomain.com',' staging.mydomain.com')
mailComp='JMail'
smtpServer='localhost'
fromAddr='info@mydomain.com'</CODE>

Here is the error message:
[quote]Serverobjecterror'ASP0177:800401f3'
Server.CreateObjectFailed
/formmail.asp,line444
800401f3</CODE>

Here is the offending line of code:
[quote]setmailObj=Server.CreateObject('JMail.SMTPMail')</CODE>

Any input would be greatly appreciated.

Maida
www.maidanet.com

Post Edited (Maida) : 1/2/2007 4:49:20 AM GMT

maidanet
01-02-2007, 04:48 AM
/emoticons/blush.gif /emoticons/blush.gif /emoticons/blush.gif

Oh, nevermind. I figured it out

Jmail NOT JMail

heh. /emoticons/blush.gif

maidanet
01-02-2007, 05:00 AM
Well, I got the confirmation page, but I never got the form results emailed to me.

So, any ideas?

What is the IIS equivalent to Unix error logs?

Post Edited (Maida) : 1/2/2007 6:02:25 AM GMT

raymondp
01-02-2007, 09:02 AM
There could be many possibilities to this. Either the email was sent correctly to you but your spam filter might have either put it in your bulk/spam/junk folder. Or it could have been bounced and the "From" or "Reply To" address is invalid. So when there was an error the server had no way of telling you that the email was not delivered. Make sure the the email address's (from and to address) are correct and valid. You may want to test them individually. Make sure that you are using 'localhost' as the smtp server. You may want to also test out the application by inputtingalternative To address's.
If everything checks out correct, the To and From address are correct and valid. Your web applications is pointing to 'localhost' as the smtp server, then I suggest opening a ticket with dasp. Make sure you include the "to" and "from" address on the ticket. Also include the date and time you tried to send the email through your web application. And also provide the exact URL and instructions on how they can replicate the issue.

maidanet
01-02-2007, 10:47 AM
Thanks for the reply!

I did try several email addresses - on Gmail, on mydomain.com and on anotherwebhost.com with no luck in receiving the form results.

I just opened a ticket with DASP with all the information you suggested - and submitted the form again right before I submitted the ticket.

Hopefully, we can get this all figured out. /emoticons/smile.gif

maidanet
01-05-2007, 04:39 AM
I did create a trouble ticket, after many emails back and forth, I got upgraded to the attention of the sys admin.

DiscountASPnet Support said...
Your computer is resolving your domain name correctly, and we do see a couple of HTTP calls to formmail.asp today. However, the SMTP logs on the server still does not show anything send from maidanet@timpanisoftware.com. So we suspect that there's a problem with your script.

Here's the code from the formmail.asp

[quote]'Sendemail(JMailversion).

ifmailComp='JMail'then
setmailObj=Server.CreateObject('JMail.SMTPMail')
mailObj.Silent=true
mailObj.ServerAddress=smtpServer
mailObj.Sender=fromAddr
mailObj.ReplyTo=replyTo
mailObj.Subject=subject
addrList=Split(recipients,',')
foreachaddrinaddrList
mailObj.AddRecipientTrim(addr)
next
mailObj.ContentType='text/html'
mailObj.Body=body
ifnotmailObj.Executethen
SendMail='Emailsendfailed:'&mailObj.ErrorMessage&'.'
endif
exitfunction
endif</CODE>


Here's the working test code from DiscountASP

[quote]SetMailer=Server.CreateObject('JMail.SMTPMail')

Mailer.Sender='you@YourHostedDomainName.com'
Mailer.ServerAddress='localhost'
Mailer.AddRecipient'someone@somewhere.com'
Mailer.Subject='ThisisasampleemailsentusingJMail'
Mailer.Body='Congratulation'&VbCrLf&'Ifyoureceivethisis,yourmailcomponentworks'
Mailer.Priority=3

Mailer.Execute

Response.Write'Mailsent...'</CODE>

Looks like I'm missing the .Execute, but maybe it's being called another way? I have to admit, I'm a PHP person, so I'm not very experienced with ASP.

bruce
01-11-2007, 07:04 AM
what is the value of this variable?


smtpServer


Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

maidanet
01-11-2007, 09:05 AM
Well, I went with a different script /emoticons/smilewinkgrin.gif which worked on the first try.

mucha
01-18-2007, 10:28 AM
I'm looking to build a form that submits to an email...may I ask what script you found that worked? Thanks!

wisemx
01-18-2007, 10:35 AM
Do you want the form code for ASP v3 or ASP.NET v 2.0?

raymondp
01-19-2007, 01:53 AM
This looks like it should work. Are you getting errors or bounce back message when this web application is triggered?

maidanet
01-19-2007, 07:50 AM
no, so far it has been working as expected :)

maidanet
01-19-2007, 12:52 PM
Using ASPEmail

[quote]<%
'ifformsubmitted(andvalid)senditviaemail
ifrequest.Form.Count>0then
'sendemail
SetMail=Server.CreateObject('Persits.MailSender')
Mail.Host='localhost'
Mail.From='download@website.com'
Mail.FromName='WebsiteName'
Mail.AddAddress'kevin@website.com'
Mail.AddCC'mjackson@website.com','msscott@website. com'
Mail.Subject='DownloadRequest'

dimbody
body=request('name')&vbcrlf
body=body&request('company')&vbcrlf
body=body&request('email')&vbcrlf
body=body&request('phone')

Mail.Body=body
Mail.IsHTML=False


OnErrorResumeNext

Mail.Send
IfErr<>0Then
Response.Write'Anerroroccurred:'&Err.Description
EndIf
%>

INSERTHTMLfortheThankYouForYourEMailmessageHERE

<%
else'displaytheformtorequestdownload
%>

INSERTHTMLfortheFORMHERE
<%
endif
%>
</CODE>

Post Edited (Maida) : 1/19/2007 1:04:09 AM GMT