Jump to content

Using Smartfax or other Email sending fax with SwyxFax


Marsn91

Recommended Posts

Hi guys,

i already had some questions about using a scanner (Kyocera 3252ci) with smart fax option in connection to swyx. I found now a possible solution with one 3rd party app to get this work. Now i will shortly describe what i am doing, and i need some help to get this included in powershelgl command ipbx transmit fax.

 

First i describe how smart fax works: the printer sends a mail to <faxnumber>@domain.de (for me i took <faxnumber>@fax.de). My exchange moves this mail (*@fax.de) to a user called "faxserver" inbox.

 

Now you can get 2 apps: first one ist Automatic MailManager, second is EEAttachments. They look if there is a new mail. If it is, the save the attachment to my folder C:\Faxsrv.

Next action you can choose is to run a batch file. In my case i run the batch with giving the parameter from the sender (which is in my case the faxnumber) to my batch.

Maybe important is that i could scan the document in *.tif format. So i need tool to convert it to *.bmp -> Therefore i use "nconvert"

cd /d C:\FAXSRV\
timeout /t 5



ren *.tif %1.tif

set dateiname=%1.tif
set faxnummer=%1
set "faxnummer=%faxnummer:@fax.de=%" 

ren *.tif %faxnummer%.tif
nconvert -out bmp %faxnummer%.tif
cd /d C:\Program Files (x86)\NetPhone Client\
start FaxClient.exe /f:"C:\FAXSRV\%faxnummer%.bmp" /n:%faxnummer%  
cd  C:\FAXSRV\
timeout /t 30
 
del %faxnummer%.bmp
del %faxnummer%.tif

Now thats the script. For me i could only get this work with Automatic Email Manager. The EEAttachments starts like a service, so there is no data given to my batch (why i don't know)

For me it would be better to use EEAttachments because of having a license there. So my question to you is: could i call the Powershellscript for sending faxes out of the bat file with giving there my variable values?

 

Hopefully this was some help for people who search something like this for sending faxes.

Link to comment
Share on other sites


  • 3 weeks later...
  • Most Valued User

Hello,

 

you should have a look at the Swyx Powershell Module. It already contains a very easy to use commandlet to send faxes: "Send-IpPbxFax".

 

<#
.SYNOPSIS
    Sends a fax to an internal or external destination.
.DESCRIPTION
    The Send-IpPbxFax cmdlet sends a fax to an internal or external destination.
.PARAMETER Sender
    FaxClientLocalConfigEntry object which contains all relevant sender information.
    Use the cmdlet "Get-IpPbxFaxClientConfig" to get the correct sender information for your fax. 
    If this parameter is not provided the FaxClientLocalConfigEntry object of the current IpPbx User (the user you used for logon) will be used.
.PARAMETER Recipient
    IpPbxFaxRecipient object which contains detailed recipient information.
    If this information is needed you can just use the number parameter instead.
.PARAMETER Number
    Use this parameter if you want to send a quick fax without detailed recipient information.
.PARAMETER Message
    Message (Memo) which is printed on the cover page.

.PARAMETER FaxFile
    Use this parameter to attach additional pages to the fax.
    Therefore you must provide a path to a Structured Fax File (SFF) or a Tagged Image File (TIF).

.PARAMETER AddCoverPage
    Defines if a cover page is added to the fax (true by default).
.PARAMETER Priority
    Sets the priority of the fax (Low/Normal/High).
    The default is "Normal".
.PARAMETER Resolution
    Defines the quality of the fax (Standard/High).
    The default is "Standard".
.INPUTS
    [IpPbxFaxRecipient] $Recipient
    [string] $DestinationNumber
.OUTPUTS
    None
.EXAMPLE
    Send-IpPbxFax -Number "+4923123456789" -Message "This is a test fax number 1." -SenderName "Sebastian"

    Sends a fax to number "+4923123456789" from sender "Sebastian".
    The content of the fax is "This is a test fax number 1.".
.EXAMPLE
    $Sender = Get-IpPbxFaxClientConfig -UserName "Sebastian"
    Send-IpPbxFax -Sender $Sender -Number "+4923123456789" -Message "This is a test fax number 2." -Priority High

    Sends a fax to number "+4923123456789" from sender "Sebastian" with high priority.
    The content of the fax is "This is a test fax number 2.".
.EXAMPLE
    Send-IpPbxFax -Number "+4923123456789" -FaxFile "c:\FaxFiles\TestFax3.sff" -Message "This is a test fax number 3." -SenderName "Sebastian"

    Sends a fax to number "+4923123456789" from sender "Sebastian".
    The content of the fax is a cover page with the message "This is a test fax number 3.".
    The following pages is the content of the file "c:\FaxFiles\TestFax3.sff".
.EXAMPLE
    New-IpPbxFaxRecipient -Name          "John Doe" `
                                               -Email         "john.doe@mycompany.com" `
                                               -Address       "John-Doe-Street No. 1" `
                                               -Department    "Development" `
                                               -Organization  "John Doe Inc." `
                                              -FaxNumber     "+4923123456789" `
                                              -PhoneNumber   "+4923199999999" | Send-IpPbxFax -Message "This is a test fax number 4." -SenderName "Sebastian"

    Creates a new recipient "John Doe" and sends him a fax from sender "Sebastian".
    The content of the fax is "This is a test fax number 4.".
#>

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.