I cant think of anyway that opening the client would be possible in
the VB/C# file, as that code runs on the server, not on the client,
which is where the mail client would reside.
If i may, why does the link not work for you? Because you dont want
the user to see it? Or because of the multiple possible emails? or?
Or are you trying to send the mail completely automated without any user
input for the body and such? In that case the System.Web.Mail way is the
only way i know, short of going out and finding yourself another library
to buy/download.
If its either of the first two objections though, the code below would
address both of those issues.
'// ===== BEGIN CODE ================================================== =
<%
Dim whichMail As String
If array(1) Then
whichMail = "la**@nospam.bas.no.com"
ElseIf array(2) Then
whichMail = "so*****@somewhere.com"
Else
whichMail = ""
End If
If whichMail <> "" Then
%>
<a id="doMail" href='mailto:<%=whichMail%>'
style="display: none;"></a>
<script>
doMail.click();
</script>
<% End If%>
'\\ ===== END CODE ================================================== ===
Lars Grøtteland wrote:
I'm not able to create a link. I know how it's done, but here is what I want
to do:
I have created a aspx page with an array inside it, telling me what the
email should be.
If array(1) it should be la**@nospam.bas.no.com
If array(2) it should be something else.
The asp page is receiving the input parameter, and I can see that the email
address is working fine. I receive the right mail address in the aspx page,
but the sending is more troublesome.
Can I use OnClick event? Or how can I do this?