Jump to content

Filip Langenbick-Boey

Newbies
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Filip Langenbick-Boey

  • Rank
    newbie
  1. Hello, I have this script to automate sending emails with and attachment. For some reason in OS 10.11.2 El Capitan this script won't sent the attachment anymore. Does anyone know the reason why. I tried on Macs with an older system and it works? Thanks for helping me, Filip Campaigns: Action: Send Campaign If [ TestForIWP ] Halt Script End If # Allow User Abort [ Off ] # Show Custom Dialog [ Title: "Message"; Message: "Send This Campaign?¶"; Buttons: “OK”, “Cancel” ] If [ Get ( LastMessageChoice ) = 1 ] If [ IsEmpty (Campaigns::Template_Subject & Campaigns::Template_Body) ] Show Custom Dialog [ Message: "Please choose a template"; Buttons: “OK” ] Go to Field [ Campaigns::Template_Subject ] Commit Records/Requests [ No dialog ] Halt Script End If # If [ not IsValid(i_Campaign_Contacts::kf_ID_Contact) ] Show Custom Dialog [ Message: "Please choose a recipient"; Buttons: “OK” ] Halt Script End If # Go to Layout [ “Record Detail Mailings” (Campaigns) ] # Set Variable [ $AddAttachment; Value:Let ( [ MAC = "filemac:" & Get ( DesktopPath ) ; PC = "filewin:" & Get ( DesktopPath ) ]; Case(Abs(Get ( SystemPlatform )) = 1; MAC; Abs(Get ( SystemPlatform ))= 2 ; PC ) & GetAsText ( Campaigns::Campaign_Attachment ) ) ] If [ not IsEmpty ( Campaigns::Campaign_Attachment ) ] Export Field Contents [ Campaigns::Campaign_Attachment; “$AddAttachment” ] End If # Go to Related Record [ From table: “CampaignContacts_ContactsByID”; Using layout: “Record List Contacts” (Contacts) ] [ Show only related records ] # Loop Set Field [ Campaigns::g_ID_Contact_Temp; Contacts::k_ID_Contact ] Go to Layout [ “Record Detail Mailings” (Campaigns) ] Set Field [ Campaigns::g_Body_Select; Substitute ( Campaigns::Template_Body; [ "<First Name>"; Contacts_Temp::Name_First ]; ["<Last Name>"; Contacts_Temp::Name_Last]; ["<Full Name>"; Contacts_Temp::Name_Full]; ["<Title>"; Contacts_Temp::Title]; ["<Fonction>"; Contacts_Temp::Fonction]; ["<Company Name>"; Contacts_Temp::Contact_Company]; ["<Street>"; Contacts_Temp::Street1]; ["<City>"; Contacts_Temp::City1]; ["<State>"; Contacts_Temp::State_Province1]; ["<Postal Code>"; Contacts_Temp::Postal_Code1]; ["<Phone>"; Contacts_Temp::Phone] )] Send Mail [ Send via E-mail Client; To: Contacts_Temp::Email; Subject: Campaigns::Template_Subject; Message: Campaigns::g_Body_Select & Case ( IsEmpty ( Campaigns::Campaign_Attachment ); "" ; "¶" ); Attachment: “$AddAttachment” ] [ No dialog ] Go to Layout [ “Record List Contacts” (Contacts) ] Go to Record/Request/Page [ Next; Exit after last ] End Loop # Freeze Window # Set Field [ Campaigns::g_ID_Campaign_Select; Campaigns::k_ID_Campaign ] Go to Layout [ “Mailings History Utility” (i_Campaign_History) ] New Record/Request Set Field [ i_Campaign_History::kf_ID_Campaign; Campaigns::g_ID_Campaign_Select ] Go to Layout [ “Record Detail Mailings” (Campaigns) ] # End If 24 February 28 14:08:05 • ECB Contacts.fp7 - Send Campaign -2- script send mail with attachment.pdf
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.