1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

Need help in asp to activate template contact form

Discussion in 'Web Development' started by monikathegreat, Jan 15, 2015.

  1. monikathegreat

    monikathegreat New Member

    Hi,

    Please help me to activate template contact form with smtp authentication
    Below are my contact-us.html code.

    <h3>Contact Form</h3>

    <form id="contact-form">
    <form action="thanks.asp" method="post" id="form" class="contact-form">
    <div class="success"> Contact form submitted! <strong>We will be in touch soon.</strong> </div>
    <fieldset>
    <div>
    <label class="name">
    <input type="text" value="Name:">
    <br>
    <span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span> </label>
    </div>
    <div>
    <label class="email">
    <input type="email" value="E-mail:">
    <br>
    <span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span> </label>
    </div>
    <div>
    <label class="phone">
    <input type="tel" value="Phone:">
    <br>
    <span class="error">*This is not a valid phone number.</span> <span class="empty">*This field is required.</span> </label>
    </div>
    <div>
    <label class="message">
    <textarea>Message:</textarea>
    <br>
    <span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span> </label>
    </div>
    <div class="buttons-wrapper"><a class="button" data-type="reset">Clear</a><a class="button" data-type="submit">Send</a></div>
    </fieldset>
    </form>
    ---------------------------------------------
    thanks.asp page code are below:-

    <%
    response.write(Request(""))
    Dim m_OrderForm, m_onum
    m_OrderForm=0
    if Request("Name")<>"" Then
    response.write("")
    m_on=(CDbl(Now())*10000000)
    m_onum="AP" & Year(Now()) & "/" & Left(m_on,6) & "/" & Mid(m_on,7,4)
    m_OrderForm=1
    'Notify us via mail
    Dim s
    Dim msg
    s=""
    s=s & "Customer Name : " & Request("Name") & vbcrlf
    s=s & "Enquiry No. : " & m_onum & vbcrlf
    s=s & "Enquiry Date/Time : " & Now() & vbcrlf
    s=s & "Logged IP : " & Request.ServerVariables("REMOTE_ADDR") & vbcrlf & vbcrlf & vbcrlf
    s=s & "Enquiry Details :-" & vbcrlf
    s=s & "--------------------" & vbcrlf
    s=s & "Name : " & Request("Name") & vbcrlf
    s=s & "Organization : " & Request("Organization") & vbcrlf & vbcrlf
    s=s & "Address : " & Request("Address") & vbcrlf
    s=s & "Country : " & Request("Country") & vbcrlf
    s=s & "Phone : " & Request("Phone") & vbcrlf
    s=s & "EMail : " & Request("Email") & vbcrlf & vbcrlf
    s=s & "Description : " & Request("Description") & vbcrlf


    msg="An enquiry has been placed at xyz.com details as below :-" & vbcrlf & vbcrlf
    msg=msg & s
    msg=msg & vbcrlf & vbcrlf & "- (company name) "
    Call SendMail("my email"
    msg.MailServerPassword="mailpassword"
    msg.From = strFrom
    msg.FromName = strFrom

    eml=split(strTo,",")
    for i=lbound(eml) to ubound(eml)
    if len(eml(i) & "")>0 Then
    msg.AddRecipient trim(eml(i) & "")
    end if
    next
    msg.Subject = strSubject
    'msg.HTMLBody=strMessage
    msg.Body=strMessage
    msg.Priority=1
    if not msg.Send("mail.xyz.com") then
    Response.write "<pre>" & msg.log & "</pre>"
    end if
    End Sub
    %>

    Thanks In Advance
    Regards
    Monika Verma