Check my code...

Discussion in 'Software' started by mr_flea, Feb 2, 2004.

  1. mr_flea

    mr_flea First Sergeant

    I couldn't test this for myself, so could someone test it or check it for me?

    Code:
    [b][color=#008000]set[/b][/color] [b]objMail[/b] [color=#008000]=[/color] [b]Server[/b][color=#008000].[/color][b]CreateObject[/b][color=#008000]([/color][i]"CDONTS.NewMail"[/i][color=#008000])[/color]
    [b]objMail[/b][color=#008000].[/color][b]Importance[/b] [color=#008000]=[/color] [color=#ff00f0]2[/color]
    [b]objMail[/b][color=#008000].[/color][b]From[/b] [color=#008000]=[/color] [b]email[/b]
    [b]objMail[/b][color=#008000].[/color][b]Subject[/b] [color=#008000]=[/color] [b]subject[/b]
    [b]objMail[/b][color=#008000].[b]To[/b][/color] [color=#008000]=[/color] "[i][email="alexinia@iowatelecom.net"]alexinia@iowatelecom.net[/email]"[/i]
    [b]objMail[/b][color=#008000].[/color][b]BodyFormat[/b] [color=#008000]=[/color] [color=#ff00f0]1[/color]
    [b]objMail[/b][color=#008000].[/color][b]MailFormat[/b] [color=#008000]=[/color] [color=#ff00f0]1[/color]
    [b]objMail[/b][color=#008000].[/color][b]Body[/b] [color=#008000]=[/color] [b]message[/b]
    [b]objMail[/b][color=#008000].[/color][b]Send[/b]
    [b][color=#008000]set[/b][/color] [b]objMail[/b] [color=#008000]=[/color] [b][color=#008000]nothing[/color][/b]
    [color=#008000][color=black]
    [/color]

    [/color]btw. anything that isn't in quotes is a variable, not actually what I wanted to send.
     
    Last edited: Feb 2, 2004
  2. Kodo

    Kodo SNATCHSQUATCH

    On Error Resume Next
    objMail.Send
    If Err <> 0 Then
    Response.Write "An error occurred: " & Err.Description
    else
    Response.write "<br><CENTER><H3>Thank You! Your Mail Has Been Sent</H3></CENTER>"

    End If

    I would add this in. Otherwise it looks fine.
     
  3. mr_flea

    mr_flea First Sergeant

    I already have one that checks for errors before actually sending it using that. I didn't include it because the board would have mangled it anyway...
     
  4. mr_flea

    mr_flea First Sergeant

    I'm trying to insert a message like this:

    Sender's IP: 0.0.0.0 (real ip will be inserted there from variable)
    Sender's Message:

    (sender's message will be here)


    I can't figure out how to skip lines in the code. Actually skipping a line usually causes an error (I haven't tried it in the mail script yet though...), and the message sends as text to protect me from any html that may be put in the message. Any ideas?
     
  5. Kodo

    Kodo SNATCHSQUATCH

    to make a new line use vbCrLF

    so "BLAH"&vbCrLf&"BOO" would show up as

    BLAH
    BOO
     
  6. mr_flea

    mr_flea First Sergeant

    You always use such interesting words in your replies... ;)

    That method should work good.
     
    Last edited: Feb 2, 2004

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds