User Tag List

Results 1 to 10 of 10

Thread: Sending Emails from within MMF2

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sending Emails from within MMF2

    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.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    You could use the GET object to communicate with a php script that sends the emails for you.

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    it's possible with .net extension, I made a very basic example that is available somewhere on this forum.

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

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

    EDIT - found it.

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    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.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

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

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    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).

  8. #8
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    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.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    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.

  10. #10
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2006
    Location
    In a Dark room with only a lamp
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sending Emails from within MMF2

    Ok

    I have found a working VBS script which sends an email with an attachment using the default Outlook Profile:

    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
    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.

    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.

Similar Threads

  1. Emails in MMF Standard
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th April 2012, 02:41 PM
  2. MMF2 - Sending XML File via HTTP
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th December 2007, 01:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •