Aklımda Kalası Kelimeler

* давайте работать вместе
* Zarf ve Mazruf, Zerafet(xHoyratlık) ile aynı kökten(za-ra-fe) gelir
* Bedesten
* Suç subuta ermiştir - Suç sabit olmuştur

21 Ağustos 2010 Cumartesi

ASP ile Mail gönderme

Kaynağın bir kopyası. Bir kenarda yedek olarak dursun. Hemen dönüp bakması kolay olur :)
Referans: http://www.webcheatsheet.com/asp/sending_email_asp.php

Sending a text email



Sending email with CDOSYS is a simple task. First you create a reference to the CDO component. Then fill-in From, Subject and To fields of the headers and the body text. Also you can add Bcc and Cc headers. Then you use the Send method to send the email. That’s all.

<%
Set Mail=CreateObject("CDO.Message")
Mail.Subject="Email subject"
Mail.From="from@domain.com"
Mail.To="to@domain.com"
Mail.Bcc="someone1@domain.com"
Mail.Cc=someone2@domain.com
Mail.ReplyTo ="replyto@domain.com"
Mail.TextBody="This is an email message."
Mail.Send
set Mail =nothing
%>


Sending an HTML email



The process is quite similar to sending the regular text message.

<%
Set Mail=CreateObject("CDO.Message")
Mail.Subject="Email subject"
Mail.From="from@domain.com"
Mail.To=to@domain.com
Mail.ReplyTo ="replyto@domain.com"
Mail.HTMLBody = "<h1>This is an email message.</h1>"
Mail.Send
set Mail=nothing
%>


Sending an email with an Attachment



Please note, when using the .AddAttachment method in your scripts you must use a fully qualified pathname as the argument to the method. Using just a file name or a relative path will produce the error The specified protocol is unknown. By repeating the .AddAttachment method you can attach more than one file.

<%
Set Mail=CreateObject("CDO.Message")
Mail.Subject="Email subject"
Mail.From="from@domain.com"
Mail.To="to@domain.com"
Mail.TextBody="This is an email message."
Mail.AddAttachment "c:\mydocuments\test.txt"
Mail.Send
set Mail=nothing
%>


Sending an email using a remote server



Sometimes you need to send an email using another server. To accomplish that you need to set the configuration properties to the server.

<%
Set Mail = CreateObject("CDO.Message")

'This section provides the configuration information for the remote SMTP server.

'Send the message using the network (SMTP over the network).
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="mail.yourdomain.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

'Use SSL for the connection (True or False)
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

'If your server requires outgoing authentication, uncomment the lines below and use a valid email address and password.
'Basic (clear-text) authentication
'Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
'Your UserID on the SMTP server
'Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="mail@yourdomain.com"
'Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword"

Mail.Configuration.Fields.Update

'End of remote SMTP server configuration section

Mail.Subject="Email subject"
Mail.From="from@domain.com"
Mail.To="to@domain.com"
Mail.TextBody="This is an email message."

Mail.Send
Set Mail = Nothing
%>



Sending an email via Gmail



<%
Set Mail = CreateObject("CDO.Message")

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.gmail.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="username@gmail.com"
Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="yourpassword"

Mail.Configuration.Fields.Update

Mail.Subject="Email subject"
Mail.From="from@domain.com"
Mail.To="to@domain.com"
Mail.TextBody="This is an email message."

Mail.Send
Set Mail = Nothing
%>


Load Recipients from a Database


This task may be accomplished in several ways. This is one of many methods.

For example, our database is an MS Access database stored on the local disk. We are interested in Customers table and Name and Email fields.

Set dbConnection = CreateObject("ADODB.Connection")
dbConnection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\Databases\Customers.mdb"
SQLQuery = "SELECT Name, Email FROM Customers"
Set Result = dbConnection.Execute(SQLQuery)
if Not Result.EOF then
Do While Not Result.EOF
SendMail Result("Name"), Result("Email")
Result.MoveNext
Loop
end if
dbConnection.Close

As you can see the code is simple. We create a database connection object then open the database and query it for the Name and Email fields of each customer. Those values are passed for each customer to the procedure that sends an email to the customer. Note that the recipient's address is formatted as "Name" <email@domain.com> for a more professional look to the recipient.

Sub SendMail(name, address)

Dim Message, SendTo
SendTo = Chr(34) & Name & Chr(34) & "<" & Address & ">"

Set Mail = CreateObject("CDO.Mail")
Mail.Subject = "Email subject"
Mail.From = "from@domain.com"
Mail.To = SendTo
Mail.TextBody="This is an email message."

Mail.Send
Set Mail = Nothing

End Sub


Set the priority/importance of an email and request a read/return receipt



<%
Set Mail = CreateObject("CDO.Message")

' Set the priority/importance of an email
' For Outlook:
Mail.Fields.Item(cdoImportance) = cdoHigh
Mail.Fields.Item(cdoPriority) = cdoPriorityUrgent
' For Outlook Express:
Mail.Fields.Item("urn:schemas:mailheader:X-Priority") = 1

' Request a read/return receipt
' Read receipt
Mail.Fields("urn:schemas:mailheader:disposition-notification-to") = "admin@domain.com"
' Return receipt
Mail.Fields("urn:schemas:mailheader:return-receipt-to") = "admin@domain.com"

Mail.DSNOptions = 14
Mail.Fields.update

Mail.Subject = "Email subject"
Mail.From = "from@domain.com"
Mail.To = "to@domain.com"
Mail.TextBody="This is an email message."

Mail.Send
Set Mail = Nothing
%>

18 Ağustos 2010 Çarşamba

İlaçlar

DORSILON


Dorsilon, olabilecek hemen her türlü ağrılı kas spazmlarında kullanılan bir ilaçtır.
Bileşimindeki iki etken madde olan mefenoksalon ve parasetamol birbirini destekleyerek tedavi sağlar.

MEFENOKSALON, bir kas gevşeticidir.
PARASETAMOL ise çabuk etkisini gösteren bir ağrı kesicidir.

17 Ağustos 2010 Salı

Arka planlar - Şablon stiller


Linkedin






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<!-- <style>
input, select, textarea, button
{
font-family: Arial,Helvetica, "Nimbus Sans L" ,sans-serif;
}
button, input[type="reset"], input[type="button"], input[type="submit"]
{
background-color: buttonface;
border: 2px outset buttonface;
color: buttontext;
cursor: default;
line-height: normal !important;
padding: 0 6px;
text-align: center;
text-shadow: none;
white-space: pre;
}
input
{
letter-spacing: normal;
text-indent: 0;
text-rendering: optimizelegibility;
text-transform: none;
word-spacing: normal;
}
</style>-->
<style>
input, select, textarea, button
{
font-family: Arial,Helvetica, "Nimbus Sans L" ,sans-serif;
}
</style>
<style>
.btn-primary
{
background-color: #0571A6 !important;
background-position: 0 -400px;
border-color: #045A8B;
color: #FFFFFF !important;
}
.btn-primary:hover
{
background-color: #04608E !important;
background-position: 0 -450px;
border-color: #004A73;
}
.btn-primary:active
{
background-position: 0 -500px;
border-color: #004A73;
}
.btn-primary
{
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-bottomright: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 3px;
background-image: url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_chrome_v2.png);
background-repeat: repeat-x;
border-style: solid;
border-width: 1px;
cursor: pointer;
font-size: 12px;
line-height: 1.35;
margin: 0;
overflow: visible;
padding: 3px 10px 2px;
text-decoration: none !important;
vertical-align: top;
width: auto;
}
</style>
<style>
.btn-secondary
{
background-color: #CECECE;
background-position: 0 -600px;
border-color: #999999;
color: #666666 !important;
}
.btn-secondary
{
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-bottomright: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 3px;
background-image: url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_chrome_v2.png);
background-repeat: repeat-x;
border-style: solid;
border-width: 1px;
cursor: pointer;
font-size: 12px;
line-height: 1.35;
margin: 0;
overflow: visible;
padding: 3px 10px 2px;
text-decoration: none !important;
vertical-align: top;
width: auto;
}
.btn-secondary:hover
{
background-color: #B7B7B7;
background-position: 0 -650px;
}
.btn-secondary:active
{
background-color: #C9C9C9;
background-position: 0 -700px;
}
</style>
<style>
.bar
{
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: padding;
background: transparent url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_global_v3.png) no-repeat scroll 0 -470px;
width: 100%;
}
.wrapper
{
color: #000000;
font-family: Arial,Helvetica, "Nimbus Sans L" ,sans-serif;
font-size: 62.5%;
font-size-adjust: none;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1.2;
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: padding;
background: transparent url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_global_v3.png) no-repeat scroll 0 -510px;
height: 39px;
padding: 0 5px;
}
.nav
{
margin-left: 5px;
}
ul, menu, dir
{
-moz-padding-start: 40px;
display: block;
list-style-type: disc;
margin: 1em 0;
}
ol, ul
{
list-style-image: none;
list-style-position: outside;
list-style-type: none;
}
.tab
{
float: left;
font-size: 13px;
line-height: 35px;
margin: 1px 0 0;
margin-left: 10px;
}
</style>
</head>
<body>
<input type="submit" class="btn-primary" value="Submit Address" name="request">
<input type="submit" class="btn-secondary" value="Go" name="ppSearch">
<input type="text" maxlength="20" id="firstName-registration" value="" name="firstName">
<div class="bar">
<div class="wrapper">
<ul class="nav">
<li class="tab" id="nav-primary-home"><a href="http://www.linkedin.com/home?trk=hb_home">
<span>Home</span></a></li>
<li class="tab" id="nav-primary-what"><a href="http://www.linkedin.com/static?key=what_is_linkedin&trk=hb_what">
<span>What is LinkedIn?</span></a></li>
<li class="tab" id="nav-primary-join"><a rel="nofollow" href="/secure/register?trk=hb_join">
<span>Join Today</span></a></li>
<li class="tab" id="nav-primary-auth"><a rel="nofollow" href="/secure/login?trk=hb_signin">
<span>Sign In</span></a></li>
</ul>
</div>
</div>
</body>
</html>


4 Ağustos 2010 Çarşamba

Web Servis Referanslarından Proxy.cs dosyası ile kurtulmak ve MsBuild ile Update'e son

Wsdl.exe ile ortak bir proxy sınıfı oluşturmak için bu adrese bakılabilir.

WSDL'ın parametreleri: Web Services Description Language Tool (Wsdl.exe)
MSBuild ile Web Servislerini tek bir cs içinde toplayıp web service referanslarından kurtuldum.

MsBuild için ekşi sözlükte söylenenler.
Basit bir örnek ile MsBuild kullanımını buraya tıklayarak öğrenebilirmişiz.

Bu da MsBuild için açık kaynak task projesi.

Microsoft'un MsBuild takımının blog adresi.

MsBuild Extension.

Eeee artık MsBuild ile çalışılacaksa komut satırı parametreleri öğrenmek gerek. İşte bu adreste derleme parametreleri için Microsoftun adresi.

MsBuild için oluşturduğum xml konfigurasyon içeriği:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<PropertyGroup>
<servis1>http://localhost:40764/WSHtus.asmx</servis1>
<servis2>http://localhost:40764/WSEuclid.asmx</servis2>
<servis3>http://localhost:40764/WSBiolab.asmx</servis3>
</PropertyGroup>
<Target Name="proxyGeneration" >
<Exec Command='wsdl.exe /sharetypes /out:"D:\Fresenius Projeler\Cem\WebService_ClassLib\WSProxy.cs" "$(servis1)" "$(servis2)" "$(servis3)" ' WorkingDirectory="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64" />
</Target>

</Project>


MsBuild de kullanılabilecek xml property leri için bir ekran görüntüsü: