on composeMail(email_recipient, email_subject, email_content, the_file)
	
	try
		tell application "Postbox"
			activate
			
			
			set email_content to my findAndReplace(return, "
", email_content)
			
			
			
			
			send message subject email_subject body email_content recipient email_recipient attachment the_file
			
            activate

		end tell
        
	end try

	
end composeMail



on findAndReplace(tofind, toreplace, TheString)
	set ditd to text item delimiters
	set text item delimiters to tofind
	set textItems to text items of TheString
	set text item delimiters to toreplace
	if (class of TheString is string) then
		set res to textItems as string
	else -- if (class of TheString is Unicode text) then
		set res to textItems as Unicode text
	end if
	set text item delimiters to ditd
	return res
end findAndReplace