GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WEBDEV 2024
→
Convert ANSI string to array
Convert ANSI string to array
Iniciado por marin, jan., 27 2021 12:29 PM - 4 respostas
Conecte-se…
marin
#1
Membro registado
27 mensagems
Publicado em janeiro, 27 2021 - 12:29 PM
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?
Denunciar
0
0
marin
#2
Membro registado
27 mensagems
Publicado em janeiro, 27 2021 - 2:38 PM
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.
Denunciar
0
0
Argus
#3
Publicado em janeiro, 27 2021 - 4:36 PM
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...
Denunciar
0
0
marin
#4
Membro registado
27 mensagems
Publicado em fevereiro, 09 2021 - 8:58 AM
Thank you for the answer. I found the example which consist the solution of the problem. I should read help a bit better.
Denunciar
0
0
Renko Allard
#5
Publicado em maio, 30 2021 - 11:14 AM
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]
Denunciar
0
0
→ Voltar para WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto