Results 1 to 8 of 8

Thread: sending mail

  1. #1
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0

    Unhappy sending mail

    <%
    sch = "http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig = CreateObject("CDO.Configuration")
    With cdoConfig.Fields
    .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
    .Item(sch & "smtpserver") = "localhost"
    .Item(sch & "smtpserverport") = 25
    .update
    End With

    HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
    HTML = HTML & "<html>"
    HTML = HTML & "<head>"
    HTML = HTML & "<title>PTGLC.com - enquiry</title>"
    HTML = HTML & "</head>"
    HTML = HTML & "<body>"
    HTML = HTML & "......"
    HTML = HTML & "</body>"

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
    Set .Configuration = cdoConfig
    .From = "user@provider.com"
    .To = "user@provider.com"
    .Subject = "TAJUK EMAIL"
    .HTMLBody = HTML
    .Send
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    %>

    HTML = HTML & "<body>"
    HTML = HTML & "......"
    HTML = HTML & "</body>"

    kat body section tu aku nak letak something like this..

    HTML = HTML & "<!-- #include file=""content.asp"" -->"

    aku nk include kan file la dlm script sending mail ni.. tapi x jalan.. any idea??

  2. #2
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    em.... try to do the shortcut way i see.. hah! it remind me of my early days of learning asp... it won't work just by using include file...

    you need to use filesystem object to read the text of content.asp into variable and then assign it to your html variable.

    dim fs, f, myText

    Set fs=Server.CreateObject("Scripting.FileSystemObject ")
    Set f=fs.OpenTextFile(Server.MapPath("your path\content.asp"), 1)

    myfText = f.ReadAll

    f.Close
    Set f=Nothing
    Set fs=Nothing

    HTML = HTML & myfText

  3. #3
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0
    iamfreelancer : em.... try to do the shortcut way i see.. hah!
    Fai : aku mmg pemalass..
    iamfreelancer : it remind me of my early days of learning asp...
    Fai : disebabkan kemalasan aku terpakse belajar..
    iamfreelancer : it won't work just by using include file...
    Fai : ye ke.. hehehee.. Thanks a lot for your swift action.. ecehh..

  4. #4
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0
    Set f=fs.OpenTextFile(Server.MapPath("your path\content.asp"), 1)

    An invalid character was specified in the Path parameter for the MapPath method. waaa.. sabarr
    Last edited by fairu5; 20-08-2007 at 03:52 PM.

  5. #5
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0
    konfem sakses.. yahoo.. tq.. err.. ko nk makan ape aa?? name it.. on me..
    Last edited by fairu5; 20-08-2007 at 04:11 PM.

  6. #6
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0

    checkbox

    let say... 3 option

    <input name="checkbox" type="checkbox" value="myText1" checked />
    <input name="checkbox" type="checkbox" value="myText2" checked />
    <input name="checkbox" type="checkbox" value="myText3" checked />

    (check box) user can select 1 or more..

    <%
    dim fs, f, myText

    Set fs1=Server.CreateObject("Scripting.FileSystemObjec t")

    Set f1=fs1.OpenTextFile(Server.MapPath("path\content1. asp"), 1)
    myText1 = f1.ReadAll

    f1.Close
    Set f1=Nothing
    Set fs1=Nothing

    Set fs2=Server.CreateObject("Scripting.FileSystemObjec t")

    Set f2=fs2.OpenTextFile(Server.MapPath("path\content2. asp"), 1)
    myText2 = f2.ReadAll

    f2.Close
    Set f2=Nothing
    Set fs2=Nothing

    Set fs3=Server.CreateObject("Scripting.FileSystemObjec t")

    Set f3=fs3.OpenTextFile(Server.MapPath("path\content3. asp"), 1)
    myText3 = f3.ReadAll

    f3.Close
    Set f3=Nothing
    Set fs3=Nothing
    %>

    user will receive an email reg. to their selection

    HTML = HTML & checkbox <-- totaly wrong man..

    : how aaa??

  7. #7
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    capture the form variable "checkbox" value and assign the local fields that u need....

    select case request.form("checkbox")
    case 'myText1'
    HTML = HTML & myText1
    case 'myText2'
    HTML = HTML & myText2
    case 'myText3'
    HTML = HTML & myText3
    end select

  8. #8
    Join Date
    Jun 2007
    Location
    Ampang
    Posts
    18
    Rep Power
    0

    Talking

    raksaksa = request.form("checkbox")

    select case raksaksa
    case "myText1"
    HTML = HTML & myText1
    case "myText2"
    HTML = HTML & myText2
    case "myText3"
    HTML = HTML & myText3
    end select

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mass Email Sending with outlook, SPAM?
    By cjsio in forum Email Marketing
    Replies: 3
    Last Post: 08-04-2009, 10:02 PM
  2. sending email with asp
    By ctttt in forum Website Programming
    Replies: 7
    Last Post: 06-12-2007, 06:54 PM
  3. Exabytes restriction on email sending. How to overcome?
    By AndyLow2006 in forum Paid Hosting Discussion Forum
    Replies: 2
    Last Post: 04-07-2007, 06:54 PM
  4. sending infor without pass to server?
    By calvynlee in forum Website Design
    Replies: 7
    Last Post: 20-11-2006, 11:42 AM
  5. Replies: 0
    Last Post: 16-01-2006, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30