Open new email window (default email program?)

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Mar 04, 2004 11:07 am

Hi,

Simple. %0A is URL encoding for CRLF. So do this:

mailto:[email protected]?subject=Help!&CC=[email protected];[email protected]&BCC=[email protected]&body=Hello%0AWorld

Better, use the VBScript escape function to URL encode the body text. Then you can enter the text normally and use standard %CRLF% to add new lines, and the escape function will ensure the body is formatted correctly. Here's a modified version of VBScript function showing escaped body text parameter:


VBSTART
Sub NewEmail(recipient,subject,body)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "mailto:" & recipient & "?subject=" & subject & "&Body=" & escape(body)
Set WshShell = Nothing
End Sub
VBEND

VBRun>NewEmail,[email protected],Testing,Hello World%CRLF%how are you?
MJT Net Support
[email protected]

Lumumba

Post by Lumumba » Thu Mar 04, 2004 11:33 am

Thx a lot :D

I've created a shortcut (*.lnk) on the desktop to open a standard (predefined) Trouble Ticket Request to be send to our helpdesk.

So there's no need to create a script (which I would have to support) :wink:

Cheers !

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts