I know this is possible using the Developer Edition using an extension but i was wondering if anyone knew of anyway to do it using the standard version.







I know this is possible using the Developer Edition using an extension but i was wondering if anyone knew of anyway to do it using the standard version.













You could use the GET object to communicate with a php script that sends the emails for you.
it's possible with .net extension, I made a very basic example that is available somewhere on this forum.







Thanks Corentin, do you know where the example is as i have just done a search and retreived hundreds of results?
EDIT - found it.

You could also communicate directly with a mail server via sockets (e.g. MooSock), but you'd need to read up on the SMTP protocol.


And you'd need an open SMTP server, which doesn't sound like a brilliant idea.

Well you'd have to have the app log in to your own email server, which you wouldn't be able to do securely (you'd have a username and password on it at least) so you'd risk people getting in and using it for spam. It's not the best idea, admittedly.
However there are similar risks with a php script. If you use one, make sure you lock it down so it can't be used for spamming. Make sure php is configured to use your mail server for sending, otherwise it will probably be assumed to be spam (unidentified mail server and/or mail server not authorised to send emails from this domain checks failing).







I have looked at the example that Corentin posted but it won't work as i need to do it through my works exchange server.
I also need to include an attachment, or find a way to send html within the email.

Oh dear, Exchange.
I'm not certain, but your work may need to enable some kind of SMTP or IMAP support to allow anything but Microsoft Outlook to send emails. If they don't, then there is no way.







Ok
I have found a working VBS script which sends an email with an attachment using the default Outlook Profile:
I have highlighted the variables in bold. What i want to do now is specify which exchange account to use without creating an outlook profile first if i can. I appreciate that some user details will be required but as the vbs file will be created on the fly (from within my app) and deleted after use, putting these details in isn't much of an issue.Code:Dim ToAddress Dim MessageSubject Dim MessageBody Dim MessageAttachment Dim ol, ns, newMail ToAddress = "recipients email address" MessageSubject = "Subject" MessageBody = "Message Body" MessageAttachment = "Full Path of attachment" ' connect to Outlook Set ol = WScript.CreateObject("Outlook.Application") Set ns = ol.getNamespace("MAPI") Set newMail = ol.CreateItem(olMailItem) newMail.Subject = MessageSubject newMail.Body = MessageBody & vbCrLf ' validate the recipient, just in case... Set myRecipient = ns.CreateRecipient(ToAddress) myRecipient.Resolve If Not myRecipient.Resolved Then MsgBox "Unknown recipient" Else newMail.Recipients.Add(myRecipient) newMail.Attachments.Add(MessageAttachment).Displayname = "attachment title" newMail.Send End If Set ol = Nothing
Does anyone know if this is possible??
Feel free to use the above vbs script in any of your projects as i found it on a royalty free/credit free website.