Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is this program right for me?
#8
This simple function uses aspSmartMail component (attached) to send email. Create new function and name it eg "SendEmail4".

Code:
Copy      Help
[color=green];/[/color]
[color=blue]function [/color]$smtp_server $from $to $subject $text [$files]

[color=green];files: list of attachments, eg "$desktop$\file1.txt[]$desktop$\file2.txt"[/color]

[color=green];EXAMPLE
;SendEmail4 "mail.myhost.com" "[email protected]" "[email protected]" "Hello!" "Some[]text"[/color]


[color=blue]typelib [/color]aspSmartMail "aspSmartMail.dll"

aspSmartMail.SmartMail m._create
m.Server=smtp_server
m.SenderAddress=from
m.Recipients.Add(to)
m.Subject=subject
m.Body=text
[color=blue]str [/color]s
[color=blue]foreach[/color](s files) m.Attachments.Add(s.expandpath)

m.SendMail


Attached Files
.dll   aspSmartMail.dll (Size: 112 KB / Downloads: 237)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)