FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
Convert ANSI string to array
Convert ANSI string to array
Débuté par marin, 27 jan. 2021 12:29 - 4 réponses
Connectez-vous…
marin
#1
Membre enregistré
27 messages
Posté le 27 janvier 2021 - 12:29
Hi, I am newby in Webdev and general begginer in programing at all.
Trying to send mail, I configured SMTP for sending mail, put Edit box for data input and here is my code.
I am getting error in "Suggestion..Recipient = EDT_Receive_to" line in EMAIL PREPARATION part, it can not convert ANSI string to array.
Tried StringToArray, but it does not work, and also tried to extract string but no success. Does anyone have suggestion?
Signaler
0
0
marin
#2
Membre enregistré
27 messages
Posté le 27 janvier 2021 - 14:38
I've used a WordToArray function to pass string from Edit control for recipient and it seams that it is no error anymore there, but still can't send the message. Suspect that is problem in SMTP configuration. Any thoughts? Thanks in advance.
Signaler
0
0
Argus
#3
Posté le 27 janvier 2021 - 16:36
as you are a beginner, I'm going to give you a step by step method...
First read the error message (and give us the FULL error message)... Here it says
"it can not convert ANSI string to array"
And this is happening on the line "Suggestion..Recipient = EDT_Receive_to"
So clearly, this means that EDT_Receive_to is an ansi string, and that Suggestion..Recipient IS AN ARRAY... which makes total sense, as you can always send an email to MULTIPLE recipient
Now, if Suggestion..Recipient is an array, you need to set your value in ONE LINE of the array, and the syntax is therefore here:
Suggestion..Recipient[1] = EDT_Receive_to
And OF COURSE, you also need to set the NUMBER of recipients before that with something likle
Suggestion..NBRecipient = 1
Now a last advise for the beginner: READ THE HELP.... The whole solution of your problem is clearly visible in the EXAMPLES shown on the help page of the email functions...
Signaler
0
0
marin
#4
Membre enregistré
27 messages
Posté le 09 février 2021 - 08:58
Thank you for the answer. I found the example which consist the solution of the problem. I should read help a bit better.
Signaler
0
0
Renko Allard
#5
Posté le 30 mai 2021 - 11:14
Hi specify how many recepients there are.
FOR EACH STRING sDest OF sRecipientList SÉPARÉE BY “;”
Email.NbRecipient++
Email.Recipient[Email.NbRecipient] = sDest
END
If there is oly one add [1]
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte