Compare commits
10 Commits
b461812dee
...
9ecda7dd32
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ecda7dd32 | |||
| 9ad311b0b3 | |||
| 26976917a8 | |||
| 212da06422 | |||
| 291d53f73e | |||
| 8daf8851f1 | |||
| 8835e8d8cd | |||
| 7d10cb8d61 | |||
| 9af515d196 | |||
| ed62fc15c6 |
20
README.md
20
README.md
@ -1,4 +1,20 @@
|
|||||||
MoveYourPOP
|
🔄MoveYourPOP
|
||||||
|
=============
|
||||||
|
|
||||||
## MoveYourPOP
|
Outil de transformation des comptes POP en IMAP sur poste de travail
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
|
||||||
|
[https://codeberg.org/jopazerty/moveyourpop](https://codeberg.org/jopazerty/moveyourpop)
|
||||||
|
|
||||||
|
[Release](https://codeberg.org/jopazerty/moveyourpop/releases)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Screenshots #
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
@ -46,7 +46,7 @@ $hGUI = GUICreate("MoveYourPOP", 800, 570)
|
|||||||
GUISetBkColor(0xf2f2f2)
|
GUISetBkColor(0xf2f2f2)
|
||||||
|
|
||||||
GUISetFont(10, 500, default, "Segoe UI")
|
GUISetFont(10, 500, default, "Segoe UI")
|
||||||
GUICtrlCreateLabel("moveYourPOP© by jop - Version 1.2", 0, 553, 800, 15, $SS_CENTER)
|
GUICtrlCreateLabel("moveYourPOP© by jop - Version 1.3", 0, 553, 800, 15, $SS_CENTER)
|
||||||
GUICtrlSetFont(-1, 8, 500, 2, "Segoe UI")
|
GUICtrlSetFont(-1, 8, 500, 2, "Segoe UI")
|
||||||
GUICtrlSetBkColor(-1, 0xf2f2f2)
|
GUICtrlSetBkColor(-1, 0xf2f2f2)
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ GUIctrlSetFont(-1,11, 600, Default, "Segoe UI")
|
|||||||
;~ GUICtrlSetColor(-1, $color)
|
;~ GUICtrlSetColor(-1, $color)
|
||||||
;~ GUICtrlSetTip(-1, "Séparez les domaines par un |", "Domaines à rechercher")
|
;~ GUICtrlSetTip(-1, "Séparez les domaines par un |", "Domaines à rechercher")
|
||||||
;~ GUICtrlSetCursor(-1, 4)
|
;~ GUICtrlSetCursor(-1, 4)
|
||||||
;~ $searchDoamin = GUICtrlCreateInput("ac-nice.fr|ac-aix-marseille.fr", 470, 21, 140, 25)
|
;~ $searchDoamin = GUICtrlCreateInput("ac-nancy-metz.fr|region-academique-grand-est.fr", 470, 21, 140, 25)
|
||||||
;~ GUICtrlSetFont(-1, 10, 500, Default, "Segoe UI")
|
;~ GUICtrlSetFont(-1, 10, 500, Default, "Segoe UI")
|
||||||
;~ $refresh = GUICtrlCreateLabel("🔄", 610, 20, 30, 33)
|
;~ $refresh = GUICtrlCreateLabel("🔄", 610, 20, 30, 33)
|
||||||
;~ GUICtrlSetFont(-1, 15, 500, Default, "Segoe UI")
|
;~ GUICtrlSetFont(-1, 15, 500, Default, "Segoe UI")
|
||||||
@ -207,12 +207,12 @@ While 1
|
|||||||
$directory = $allServer[$c][4]
|
$directory = $allServer[$c][4]
|
||||||
$smtpID = $allServer[$c][5]
|
$smtpID = $allServer[$c][5]
|
||||||
$popAdress = $allServer[$c][6]
|
$popAdress = $allServer[$c][6]
|
||||||
If StringInStr($popAdress, "ac-nice.fr") Then
|
If StringInStr($popAdress, "ac-nancy-metz.fr") Then
|
||||||
$domain = ".ac-nice.fr"
|
$domain = ".ac-nancy-metz.fr"
|
||||||
$smtpAddress = "smtps.ac-nice.fr"
|
$smtpAddress = "smtps.ac-nancy-metz.fr"
|
||||||
ElseIf StringInStr($popAdress, "ac-aix-marseille.fr") Then
|
ElseIf StringInStr($popAdress, "region-academique-grand-est.fr") Then
|
||||||
$domain = ".ac-aix-marseille.fr"
|
$domain = ".ac-nancy-metz.fr"
|
||||||
$smtpAddress = "smtp.ac-aix-marseille.fr"
|
$smtpAddress = "smtps.ac-nancy-metz.fr"
|
||||||
EndIf
|
EndIf
|
||||||
FileWrite($profileDirectory&"\user.js", 'user_pref("mail.identity.'&$identity&'.archive_folder", "imap://'&$accountName&'@imap'&$domain&'/Archives");'&@CRLF)
|
FileWrite($profileDirectory&"\user.js", 'user_pref("mail.identity.'&$identity&'.archive_folder", "imap://'&$accountName&'@imap'&$domain&'/Archives");'&@CRLF)
|
||||||
FileWrite($profileDirectory&"\user.js", 'user_pref("mail.identity.'&$identity&'.draft_folder", "imap://'&$accountName&'@imap'&$domain&'/Drafts");'&@CRLF)
|
FileWrite($profileDirectory&"\user.js", 'user_pref("mail.identity.'&$identity&'.draft_folder", "imap://'&$accountName&'@imap'&$domain&'/Drafts");'&@CRLF)
|
||||||
@ -322,11 +322,14 @@ Func _getAllServer($profileDirectory)
|
|||||||
$serverID = $serverID[3]
|
$serverID = $serverID[3]
|
||||||
$searchForAcNice = _searchValueInPrefsJsArrayRegex($prefsToArray, "mail\.server\."&$serverID&"\.hostname$")
|
$searchForAcNice = _searchValueInPrefsJsArrayRegex($prefsToArray, "mail\.server\."&$serverID&"\.hostname$")
|
||||||
For $p = 1 To $searchForAcNice[0]
|
For $p = 1 To $searchForAcNice[0]
|
||||||
$domainToSearch = "ac-nice.fr|ac-aix-marseille.fr"
|
$domainToSearch = "ac-nancy-metz.fr|region-academique-grand-est.fr"
|
||||||
$domainToSearch = StringReplace($domainToSearch, ".", "\.")
|
$domainToSearch = StringReplace($domainToSearch, ".", "\.")
|
||||||
$domainToSearch = StringReplace($domainToSearch, " ", "")
|
$domainToSearch = StringReplace($domainToSearch, " ", "")
|
||||||
if StringRegExp($searchForAcNice[$p], $domainToSearch) Then
|
if StringRegExp($searchForAcNice[$p], $domainToSearch) Then
|
||||||
$infoServeur = _getInfosAboutServer($prefsToArray, $serverID)
|
$infoServeur = _getInfosAboutServer($prefsToArray, $serverID)
|
||||||
|
if @error Then
|
||||||
|
ContinueLoop
|
||||||
|
EndIf
|
||||||
$username = $infoServeur[0]
|
$username = $infoServeur[0]
|
||||||
$IDAccount = $infoServeur[1]
|
$IDAccount = $infoServeur[1]
|
||||||
$IDIdentity = $infoServeur[2]
|
$IDIdentity = $infoServeur[2]
|
||||||
@ -407,6 +410,9 @@ Func _getInfosAboutServer($prefsArray, $serverID)
|
|||||||
$aArray[0] = _searchValueInPrefsJsArray($prefsArray, "mail.server."&$serverID&".userName")
|
$aArray[0] = _searchValueInPrefsJsArray($prefsArray, "mail.server."&$serverID&".userName")
|
||||||
$accountID = _searchKeyInPrefsJsArray($prefsArray, $serverID)
|
$accountID = _searchKeyInPrefsJsArray($prefsArray, $serverID)
|
||||||
$accountID = StringSplit($accountID, ".")
|
$accountID = StringSplit($accountID, ".")
|
||||||
|
If @error Then
|
||||||
|
Return SetError(15)
|
||||||
|
EndIf
|
||||||
$accountID = $accountID[3]
|
$accountID = $accountID[3]
|
||||||
$aArray[1] = $accountID
|
$aArray[1] = $accountID
|
||||||
$aArray[2] = _searchValueInPrefsJsArray($prefsArray, "mail.account."&$accountID&".identities")
|
$aArray[2] = _searchValueInPrefsJsArray($prefsArray, "mail.account."&$accountID&".identities")
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user